mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-05-24 00:41:11 -04:00
make class_region_size configurable
This commit is contained in:
parent
8b0450555f
commit
830a7d338d
4 changed files with 9 additions and 4 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue