|
@@ -142,8 +142,8 @@ void * malloc(size_t size) {
|
|
|
if(new_raw_block != NULL) {
|
|
|
new_raw_block->next_raw_block = systemallocator.raw_block_head;
|
|
|
systemallocator.raw_block_head = new_raw_block;
|
|
|
- pthread_mutex_unlock(&systemallocator.creation_mutex);
|
|
|
#ifdef HAVE_LOCKS
|
|
|
+ pthread_mutex_unlock(&systemallocator.creation_mutex);
|
|
|
pthread_mutex_lock(&new_raw_block->mutex);
|
|
|
#endif /* HAVE_LOCKS */
|
|
|
|
|
@@ -160,9 +160,6 @@ void * malloc(size_t size) {
|
|
|
pthread_mutex_unlock(&new_raw_block->mutex);
|
|
|
#endif /* HAVE_LOCKS */
|
|
|
}
|
|
|
-#ifdef HAVE_LOCKS
|
|
|
- pthread_mutex_unlock(&systemallocator.creation_mutex);
|
|
|
-#endif /* HAVE_LOCKS */
|
|
|
}
|
|
|
|
|
|
return ptr;
|