@@ -144,8 +144,6 @@ void initialize_allocator(allocator_t *allocator) {
(maptablenode+1)->next = NULL;
#endif /* WITH_FIXED_LISTS */
- allocator->initialized = true;
-
#ifdef HAVE_LOCKS
sbrk_unlock();
#endif /* HAVE_LOCKS */
@@ -57,6 +57,7 @@ void *sys_alloc(allocator_t *allocator, heap_t *heap, size_t size) {
} else {
previous_size = 0;
previous_size_availability = 1; /* Occupied and of 0 size */
+ allocator->initialized = true;
}
#ifndef WITH_MEMORY_SPACE_AWARENESS