libc: malloc: store the global heap in a fixed region of virtual memory
This commit is contained in:
@@ -8,6 +8,12 @@
|
||||
#include <magenta/vm.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(LIBC_STATIC)
|
||||
#define HEAP_REGION_BASE 0x20000000000
|
||||
#else
|
||||
#define HEAP_REGION_BASE 0x60000000000
|
||||
#endif
|
||||
|
||||
#define HEAP_REGION_SIZE 0x40000000
|
||||
#define HEAP_EXPAND_INCREMENT 0x100000
|
||||
|
||||
@@ -40,7 +46,7 @@ static kern_status_t init_heap_region(heap_t *heap)
|
||||
|
||||
kern_status_t status = address_space_reserve(
|
||||
address_space,
|
||||
MAP_ADDRESS_ANY,
|
||||
HEAP_REGION_BASE,
|
||||
HEAP_REGION_SIZE,
|
||||
&heap->heap_base);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user