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
This commit is contained in:
@@ -760,9 +760,9 @@ port_init(kernel_args *args)
|
|||||||
return B_ERROR;
|
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,
|
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,
|
sPortAllocator = heap_create_allocator("port buffer", base,
|
||||||
kInitialPortBufferSize, &kBufferHeapClass, true);
|
kInitialPortBufferSize, &kBufferHeapClass, true);
|
||||||
if (sPortAllocator == NULL) {
|
if (sPortAllocator == NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user