From 961a96a9875cac296e96dbc7246cd7435b5ed9b0 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Wed, 29 Jun 2011 18:03:42 +0000 Subject: [PATCH] Optimize the configuration of the port heap. Previously the max bin size was 512 bytes with a heap page of 2048 bytes resulting in excessive waste for allocations between 512 and 1023 bytes. Also tune the requested alignment so that sizeof(port_message) (currently 28 bytes) can occupy one allocation unit without waste. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42340 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/port.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/kernel/port.cpp b/src/system/kernel/port.cpp index 75df0e444f..31dc726cf4 100644 --- a/src/system/kernel/port.cpp +++ b/src/system/kernel/port.cpp @@ -760,9 +760,9 @@ port_init(kernel_args *args) return B_ERROR; } - static const heap_class kBufferHeapClass = {"default", 100, + static const heap_class kBufferHeapClass = { "port heap", 100, PORT_MAX_MESSAGE_SIZE + sizeof(port_message), 2 * 1024, - sizeof(port_message), 8, 4, 64}; + sizeof(port_message), 4, 2, 24 }; sPortAllocator = heap_create_allocator("port buffer", base, kInitialPortBufferSize, &kBufferHeapClass, true); if (sPortAllocator == NULL) {