summaryrefslogtreecommitdiff
path: root/base/gsalloc.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2017-11-16 20:01:57 +0000
committerRobin Watts <Robin.Watts@artifex.com>2017-11-17 08:49:53 +0000
commitf27b751a1662c3ca8ef64c164cf3f9a400dd416b (patch)
tree47bd14145e10f8f1bda749338a1546c0854c43d7 /base/gsalloc.c
parent1e1b4dc73087212abd1c6c9bee3192a1fc6bf630 (diff)
downloadghostpdl-f27b751a1662c3ca8ef64c164cf3f9a400dd416b.tar.gz
Add SINGLE_OBJECT_MEMORY_BLOCKS_ONLY logic.
If SINGLE_OBJECT_MEMORY_BLOCKS_ONLY is defined at build time, then we restrict every clump/chunk to have just a single object in it. This makes valgrind debugging easier as the allocation given for when 'undefined' values were created is far more likely to be correct.
Diffstat (limited to 'base/gsalloc.c')
-rw-r--r--base/gsalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/gsalloc.c b/base/gsalloc.c
index 10c04dddd..b6e51de96 100644
--- a/base/gsalloc.c
+++ b/base/gsalloc.c
@@ -771,7 +771,7 @@ ialloc_alloc_state(gs_memory_t * parent, uint clump_size)
iimem->non_gc_memory = parent;
iimem->thread_safe_memory = parent->thread_safe_memory;
iimem->clump_size = clump_size;
-#ifdef MEMENTO
+#if defined(MEMENTO) || defined(SINGLE_OBJECT_MEMORY_BLOCKS_ONLY)
iimem->large_size = 1;
#else
iimem->large_size = ((clump_size / 4) & -obj_align_mod) + 1;