|
@@ -118,6 +118,15 @@ void * malloc(size_t size) {
|
|
|
systemallocator.raw_block_head = new_raw_block;
|
|
|
pthread_mutex_unlock(&systemallocator.creation_mutex);
|
|
|
ptr = dmmlib_malloc(new_raw_block, size);
|
|
|
+#ifdef BITMAP_RB_ONLY
|
|
|
+ // FIXME If ptr is still NULL, then make a last try to allocate a
|
|
|
+ // big block. This has to do with the current limitation of checking
|
|
|
+ // max. two bitmap vector elements.
|
|
|
+ if(ptr == NULL) {
|
|
|
+ ptr = (void *) create_new_raw_block(size +
|
|
|
+ sizeof(raw_block_header_t), BIGBLOCK);
|
|
|
+ }
|
|
|
+#endif /* BITMAP_RB_ONLY */
|
|
|
}
|
|
|
}
|
|
|
|