- add team id on a TRACE()
- try to accomodate for low ram systems by making the first kernel heap allocation smaller git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27943 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e978942c95
commit
4129f84603
@ -1642,7 +1642,7 @@ vm_create_anonymous_area(team_id team, const char *name, void **address,
|
||||
bool canOvercommit = false;
|
||||
addr_t physicalBase = 0;
|
||||
|
||||
TRACE(("create_anonymous_area %s: size 0x%lx\n", name, size));
|
||||
TRACE(("create_anonymous_area [%d] %s: size 0x%lx\n", team, name, size));
|
||||
|
||||
size = PAGE_ALIGN(size);
|
||||
|
||||
@ -4004,8 +4004,14 @@ vm_init(kernel_args *args)
|
||||
vm_page_init_num_pages(args);
|
||||
sAvailableMemory = vm_page_num_pages() * B_PAGE_SIZE;
|
||||
|
||||
// map in the new heap and initialize it
|
||||
size_t heapSize = INITIAL_HEAP_SIZE;
|
||||
// try to accomodate low memory systems
|
||||
while (heapSize > sAvailableMemory / 8)
|
||||
heapSize /= 2;
|
||||
if (heapSize < 1024 * 1024)
|
||||
panic("vm_init: go buy some RAM please.");
|
||||
|
||||
// map in the new heap and initialize it
|
||||
addr_t heapBase = vm_allocate_early(args, heapSize, heapSize,
|
||||
B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA);
|
||||
TRACE(("heap at 0x%lx\n", heapBase));
|
||||
|
Loading…
Reference in New Issue
Block a user