From a5ed64d01acdda1355daf09c85ef9406394596fc Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Mon, 19 Nov 2018 00:17:43 -0500 Subject: [PATCH] explain slot counts tied to slab size classes --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 3585a8f..36dded8 100644 --- a/README.md +++ b/README.md @@ -321,6 +321,13 @@ classes for every power of two spacing which results in bounding the internal fragmentation below 20% for each size class. This also means there are 4 size classes for each doubling in size. +The slot counts tied to the size classes are specific to this allocator rather +than being taken from jemalloc. Slabs are always a span of pages so the slot +count needs to be tuned to minimize waste due to rounding to the page size. For +now, this allocator is set up only for 4096 byte pages as a small page size is +desirable for finer-grained memory protection and randomization. It could be +ported to larger page sizes in the future. + | size class | worst case internal fragmentation | slab slots | slab size | internal fragmentation for slabs | | - | - | - | - | - | | 16 | 93.75% | 256 | 4096 | 0.0% |