Skip to content

Commit a0c1e48

Browse files
committed
reset BA destroy flag on BA create
1 parent c27abca commit a0c1e48

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/base_alloc/base_alloc_global.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ struct base_alloc_t {
4141
static struct base_alloc_t BASE_ALLOC = {.ac_sizes = ALLOCATION_CLASSES};
4242

4343
void umf_ba_destroy_global(void) {
44+
LOG_DEBUG("destroying global base allocator");
4445
ba_is_destroyed = true;
4546

4647
for (int i = 0; i < NUM_ALLOCATION_CLASSES; i++) {
@@ -73,7 +74,8 @@ static void umf_ba_create_global(void) {
7374
size_t smallestSize = BASE_ALLOC.ac_sizes[0];
7475
BASE_ALLOC.smallest_ac_size_log2 = utils_msb64(smallestSize);
7576

76-
LOG_DEBUG("UMF base allocator created");
77+
LOG_DEBUG("global base allocator created");
78+
ba_is_destroyed = false;
7779
}
7880

7981
// returns index of the allocation class for a given size

0 commit comments

Comments
 (0)