document padding for allocator state

pull/65/head
Daniel Micay 2018-10-15 19:08:20 -04:00
parent da8e9aa1d8
commit 67ada4d309
1 changed files with 4 additions and 1 deletions

View File

@ -556,11 +556,14 @@ struct region_allocator {
struct random_state rng;
};
struct allocator_state {
struct __attribute__((aligned(PAGE_SIZE))) allocator_state {
struct size_class size_class_metadata[N_SIZE_CLASSES];
struct region_allocator region_allocator;
// padding until next page boundary for mprotect
struct region_metadata regions_a[MAX_REGION_TABLE_SIZE] __attribute__((aligned(PAGE_SIZE)));
// padding until next page boundary for mprotect
struct region_metadata regions_b[MAX_REGION_TABLE_SIZE] __attribute__((aligned(PAGE_SIZE)));
// padding until next page boundary for mprotect
};
static void regions_quarantine_deallocate_pages(void *p, size_t size, size_t guard_size) {