From 90ac1ba8d3c44961adfaba780a7a530dc60c12dd Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Sat, 10 Dec 2022 11:11:37 +0000 Subject: [PATCH] BSD StrictProvenance minimum allocation size 16M This will serve as the granularity with which we store authority pointers in the (forthcoming) authmap, so 4K is almost surely too small. 16M is, admittedly, chosen out of a hat. --- src/snmalloc/pal/pal_bsd_aligned.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/snmalloc/pal/pal_bsd_aligned.h b/src/snmalloc/pal/pal_bsd_aligned.h index 4c88287..94e9fd5 100644 --- a/src/snmalloc/pal/pal_bsd_aligned.h +++ b/src/snmalloc/pal/pal_bsd_aligned.h @@ -23,7 +23,8 @@ namespace snmalloc static constexpr uint64_t pal_features = AlignedAllocation | PALBSD::pal_features; - static SNMALLOC_CONSTINIT_STATIC size_t minimum_alloc_size = 4096; + static SNMALLOC_CONSTINIT_STATIC size_t minimum_alloc_size = + aal_supports ? 1 << 24 : 4096; /** * Reserve memory at a specific alignment.