From d7fb022db0df15f672b5442d710f60ccb4c86319 Mon Sep 17 00:00:00 2001 From: dormando Date: Tue, 21 Jun 2016 21:25:57 -0700 Subject: allow manually specifying slab class sizes "-o slab_sizes=100-200-300-400-500" will create 5 slab classes of those specified sizes, with the final class being item_max_size. Using the new online stats sizes command, it's possible to determine if the typical factoral slab class growth rate doesn't align well with how items are stored. This is dangerous unless you really know what you're doing. If your items have an exact or very predictable size this makes a lot of sense. If they do not, the defaults are safer. --- slabs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'slabs.h') diff --git a/slabs.h b/slabs.h index b993b5f..23e713c 100644 --- a/slabs.h +++ b/slabs.h @@ -8,7 +8,7 @@ 3rd argument specifies if the slab allocator should allocate all memory up front (if true), or allocate memory in chunks as it is needed (if false) */ -void slabs_init(const size_t limit, const double factor, const bool prealloc); +void slabs_init(const size_t limit, const double factor, const bool prealloc, const uint32_t *slab_sizes); /** -- cgit v1.2.1