Changeset 97918 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Dec 30, 2022 3:59:06 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR0LibPhysHeap.cpp
r97913 r97918 91 91 92 92 /** Threshold at which to split out a tail free block when allocating. 93 * The value is the amount of user space, i.e. excluding the header. */ 93 * 94 * The value gives the amount of user space, i.e. excluding the header. 95 * 96 * Using 32 bytes based on VMMDev.h request sizes. The smallest requests are 24 97 * bytes, i.e. only the header, at least 4 of these. There are at least 10 with 98 * size 28 bytes and at least 11 with size 32 bytes. So, 32 bytes would fit 99 * some 25 requests out of about 60, which is reasonable. 100 */ 94 101 #define VBGL_PH_MIN_SPLIT_FREE_BLOCK 32 95 102 … … 485 492 /* We have a free block, either found or allocated. */ 486 493 487 #if 1 /** @todo r=bird: This might work okay for medium sizes, but it can't be good for small488 * allocations (unnecessary extra work) nor for large ones (internal fragmentation). */489 if (pBlock->cbDataSize > 2 * (cbSize + sizeof(VBGLPHYSHEAPBLOCK)))490 #else491 494 if (pBlock->cbDataSize >= sizeof(VBGLPHYSHEAPBLOCK) * 2 + VBGL_PH_MIN_SPLIT_FREE_BLOCK + cbSize) 492 #endif493 495 { 494 496 /* Data will occupy less than a half of the block,
Note:
See TracChangeset
for help on using the changeset viewer.