add configuration for canaries
This commit is contained in:
1 parent
96c538d90f
commit
fc2473e7ee
2 files changed
+2
-1
No files matched your search
@@ -5,5 +5,6 @@
|
||||
#define WRITE_AFTER_FREE_CHECK true
|
||||
#define SLOT_RANDOMIZE true
|
||||
#define ZERO_ON_FREE true
|
||||
#define SLAB_CANARY true
|
||||
|
||||
#endif
|
||||
@@ -23,7 +23,7 @@ static_assert(sizeof(void *) == 8, "64-bit only");
|
||||
static_assert(!WRITE_AFTER_FREE_CHECK || ZERO_ON_FREE, "WRITE_AFTER_FREE_CHECK depends on ZERO_ON_FREE");
|
||||
|
||||
// either sizeof(uint64_t) or 0
|
||||
static const size_t canary_size = sizeof(uint64_t);
|
||||
static const size_t canary_size = SLAB_CANARY ? sizeof(uint64_t) : 0;
|
||||
|
||||
#define CACHELINE_SIZE 64
|
||||
|
||||
|
||||
Reference in new issue
Block a user