From 7ce6a420b7b38f855b020970f63c9fb344972a3e Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Tue, 11 Dec 2007 21:54:54 +0000 Subject: [PATCH] Make the initial size of the slab depend on the CPU count. This avoids running out of initial space with more than two CPUs. I haven't fully tracked down the usage of this space, probably it is used to allocate some per CPU construct. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23115 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/vm/vm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index 8c8af7cea7..3d8dd33b88 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -3477,7 +3477,7 @@ vm_init(kernel_args *args) vm_low_memory_init(); - size_t slabInitialSize = 2 * B_PAGE_SIZE; + size_t slabInitialSize = args->num_cpus * 2 * B_PAGE_SIZE; addr_t slabInitialBase = vm_allocate_early(args, slabInitialSize, slabInitialSize, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA); slab_init(args, slabInitialBase, slabInitialSize);