add extended size classes to offset test

This commit is contained in:
Daniel Micay 2019-06-18 15:51:13 -04:00
parent bc75c4db7b
commit 539d4f0d37
2 changed files with 9 additions and 2 deletions

View File

@ -1,4 +1,5 @@
CONFIG_SLAB_CANARY := true
CONFIG_EXTENDED_SIZE_CLASSES := true
ifeq (,$(filter $(CONFIG_SLAB_CANARY),true false))
$(error CONFIG_SLAB_CANARY must be true or false)
@ -7,7 +8,8 @@ endif
LDLIBS := -lpthread
CPPFLAGS += \
-DSLAB_CANARY=$(CONFIG_SLAB_CANARY)
-DSLAB_CANARY=$(CONFIG_SLAB_CANARY) \
-DCONFIG_EXTENDED_SIZE_CLASSES=$(CONFIG_EXTENDED_SIZE_CLASSES)
EXECUTABLES := \
offset \

View File

@ -13,7 +13,12 @@ static unsigned size_classes[] = {
/* 256 */ 1280, 1536, 1792, 2048,
/* 512 */ 2560, 3072, 3584, 4096,
/* 1024 */ 5120, 6144, 7168, 8192,
/* 2048 */ 10240, 12288, 14336, 16384
/* 2048 */ 10240, 12288, 14336, 16384,
#if CONFIG_EXTENDED_SIZE_CLASSES
/* 4096 */ 20480, 24576, 28672, 32768,
/* 8192 */ 40960, 49152, 57344, 65536,
/* 16384 */ 81920, 98304, 114688, 131072,
#endif
};
#define N_SIZE_CLASSES (sizeof(size_classes) / sizeof(size_classes[0]))