3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

sat_allocator: align allocation size with page boundary to reduce memory consumption

This commit is contained in:
Nuno Lopes 2018-07-08 18:04:32 +01:00
parent a85a4f41c7
commit c5a282dadb

View file

@ -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);