Skip to content

Commit 25c57db

Browse files
committed
Add allocation class for a critnib node of size 152 bytes
Memory Tracker allocates a lot of critnib nodes of size 152 bytes. Make a separate allocation class for them, because each such allocation causes an allocation of 4kB page now and a lot of the following messages: base_alloc: allocation size (152) larger than the biggest allocation class. Falling back to OS memory allocation. Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
1 parent b415e78 commit 25c57db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/base_alloc/base_alloc_global.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ static UTIL_ONCE_FLAG ba_is_initialized = UTIL_ONCE_FLAG_INIT;
2626

2727
// allocation classes need to be consecutive powers of 2
2828
#define ALLOCATION_CLASSES \
29-
{ 16, 32, 64, 128 }
30-
#define NUM_ALLOCATION_CLASSES 4
29+
{ 16, 32, 64, 128, 256 }
30+
#define NUM_ALLOCATION_CLASSES 5
3131

3232
struct base_alloc_t {
3333
size_t ac_sizes[NUM_ALLOCATION_CLASSES];

0 commit comments

Comments
 (0)