We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8770108 commit e075fe5Copy full SHA for e075fe5
test/pools/disjoint_pool.cpp
@@ -138,6 +138,8 @@ TEST_F(test, internals) {
138
EXPECT_NE(bucket, nullptr);
139
140
// check bucket stats
141
+ // NOTE: we have to lock the bucket to properly access its internals
142
+ utils_mutex_lock(&bucket->bucket_lock);
143
EXPECT_EQ(bucket->alloc_count, 1);
144
145
// first allocation will always use external memory (newly added to the
@@ -160,6 +162,8 @@ TEST_F(test, internals) {
160
162
EXPECT_EQ(slab->chunks[1], false);
161
163
EXPECT_EQ(slab->first_free_chunk_idx, 1);
164
165
+ utils_mutex_unlock(&bucket->bucket_lock);
166
+
167
// TODO:
168
// * multiple alloc + free from single bucket
169
// * alignments
0 commit comments