make class_region_size configurable

This commit is contained in:
Daniel Micay 2018-12-05 09:23:05 -05:00
parent 8b0450555f
commit 830a7d338d
4 changed files with 9 additions and 4 deletions

View file

@ -210,7 +210,7 @@ struct __attribute__((aligned(CACHELINE_SIZE))) size_class {
size_t metadata_count_unguarded;
};
#define CLASS_REGION_SIZE (128ULL * 1024 * 1024 * 1024)
#define CLASS_REGION_SIZE (size_t)CONFIG_CLASS_REGION_SIZE
#define REAL_CLASS_REGION_SIZE (CLASS_REGION_SIZE * 2)
static const size_t slab_region_size = REAL_CLASS_REGION_SIZE * N_SIZE_CLASSES;
static_assert(PAGE_SIZE == 4096, "bitmap handling will need adjustment for other page sizes");