Allow replacing the object cache with the guarded heap.
This allows to use the debug features of the guarded heap also on allocations made through the object cache API. This is obivously horrible for performance and uses up huge amounts of memory, so the initial and grow sizes are adjusted accordingly. Note that this is a rather simple hack, using the object_cache pointer to transport the allocation size. The alignment is neglected completely.
This commit is contained in:
@@ -114,6 +114,10 @@
|
||||
#define USE_SLAB_ALLOCATOR_FOR_MALLOC 1
|
||||
// Heap implementation based on the slab allocator (for production use).
|
||||
|
||||
// Replace the object cache with the guarded heap to force debug features. Also
|
||||
// requires the use of the guarded heap for malloc.
|
||||
#define USE_GUARDED_HEAP_FOR_OBJECT_CACHE 0
|
||||
|
||||
// Enables additional sanity checks in the slab allocator's memory manager.
|
||||
#define DEBUG_SLAB_MEMORY_MANAGER_PARANOID_CHECKS 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user