From c5a282dadbaa2149d5d2f339bfa2c5348e903507 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Sun, 8 Jul 2018 18:04:32 +0100 Subject: [PATCH] sat_allocator: align allocation size with page boundary to reduce memory consumption --- src/sat/sat_allocator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sat/sat_allocator.h b/src/sat/sat_allocator.h index 06585ebed..e588c8478 100644 --- a/src/sat/sat_allocator.h +++ b/src/sat/sat_allocator.h @@ -23,7 +23,7 @@ Revision History: #include "util/machine.h" class sat_allocator { - static const unsigned CHUNK_SIZE = (1 << 16); + static const unsigned CHUNK_SIZE = (1 << 16) - sizeof(char*); static const unsigned SMALL_OBJ_SIZE = 512; static const unsigned MASK = ((1 << PTR_ALIGNMENT) - 1); static const unsigned NUM_FREE = 1 + (SMALL_OBJ_SIZE >> PTR_ALIGNMENT);