Enable guard pages in CHECK_CLIENT
Change the behaviour to use PROT_NONE for reservations in CHECK_CLIENT mode. This means that we only provide access once data is actually being used.
This commit is contained in:
committed by
Matthew Parkinson
parent
02d2ab8f7e
commit
9df0101dfd
@@ -146,7 +146,7 @@ namespace snmalloc
|
||||
FreeListBuilder<false> b;
|
||||
SNMALLOC_ASSERT(b.empty());
|
||||
|
||||
#ifdef CHECK_CLIENT
|
||||
#ifdef SNMALLOC_CHECK_CLIENT
|
||||
// Structure to represent the temporary list elements
|
||||
struct PreAllocObject
|
||||
{
|
||||
@@ -214,7 +214,7 @@ namespace snmalloc
|
||||
meta->free_queue.close(fl, key);
|
||||
void* p = finish_alloc_no_zero(fl.take(key), sizeclass);
|
||||
|
||||
#ifdef CHECK_CLIENT
|
||||
#ifdef SNMALLOC_CHECK_CLIENT
|
||||
// Check free list is well-formed on platforms with
|
||||
// integers as pointers.
|
||||
size_t count = 1; // Already taken one above.
|
||||
|
||||
Reference in New Issue
Block a user