From ae541d3fabd679c97326e81b652fa3979e734404 Mon Sep 17 00:00:00 2001 From: David Goldblatt Date: Thu, 11 Jun 2020 17:16:10 -0700 Subject: [PATCH] Edata: Reserve some space for hugepages. --- include/jemalloc/internal/edata.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/jemalloc/internal/edata.h b/include/jemalloc/internal/edata.h index fb0b489e..bb7da1d5 100644 --- a/include/jemalloc/internal/edata.h +++ b/include/jemalloc/internal/edata.h @@ -185,6 +185,18 @@ struct edata_s { size_t e_bsize; }; + /* + * Reserved for hugepages -- once that allocator is more settled, we + * might be able to claw some of this back. Until then, don't get any + * funny ideas about using the space we just freed up to keep some other + * bit of metadata around. That kind of thinking can be hazardous to + * your health. + * + * This keeps the size of an edata_t at exactly 128 bytes on + * architectures with 8-byte pointers and 4k pages. + */ + void *reserved1, *reserved2; + union { /* * List linkage used when the edata_t is active; either in