|
@@ -134,8 +134,19 @@ void initialize_allocator(allocator_t *allocator) {
|
|
|
*/
|
|
|
current_heap = &allocator->heaps[0];
|
|
|
|
|
|
+#ifdef HAVE_LOCKS
|
|
|
+ /* sys_alloc() is going to use the sbrk() lock, so it needs to be released.
|
|
|
+ */
|
|
|
+ sbrk_unlock();
|
|
|
+#endif /* HAVE_LOCKS */
|
|
|
+
|
|
|
maptablenode = (maptable_node_t *) sys_alloc(allocator, &allocator->heaps[0], 4*(sizeof(maptable_node_t)));
|
|
|
|
|
|
+#ifdef HAVE_LOCKS
|
|
|
+ /* Take back the sbrk() lock */
|
|
|
+ sbrk_lock();
|
|
|
+#endif /* HAVE_LOCKS */
|
|
|
+
|
|
|
maptablenode->size = 32;
|
|
|
maptablenode->fixed_list_head = NULL;
|
|
|
maptablenode->next = maptablenode+1;
|