summaryrefslogtreecommitdiff
path: root/gs/src/gsmemraw.h
diff options
context:
space:
mode:
authorHenry Stiles <henry.stiles@artifex.com>1998-09-04 15:53:41 +0000
committerHenry Stiles <henry.stiles@artifex.com>1998-09-04 15:53:41 +0000
commit6382283b6f812883c171bb654cc1b10c58d53051 (patch)
tree10256af38a35d3ddeb37cd598b850bb5647ac350 /gs/src/gsmemraw.h
parent35bf5548df5eed229be44891c4e8b940f37d8d8a (diff)
gs5.38
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@396 06663e23-700e-0410-b217-a244a6096597
Diffstat (limited to 'gs/src/gsmemraw.h')
-rw-r--r--gs/src/gsmemraw.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/gs/src/gsmemraw.h b/gs/src/gsmemraw.h
index 26eacfded..fc57133a6 100644
--- a/gs/src/gsmemraw.h
+++ b/gs/src/gsmemraw.h
@@ -133,18 +133,31 @@ typedef struct gs_raw_memory_s gs_raw_memory_t;
void proc(P3(mem_t *mem, uint free_mask, client_name_t cname))
#define gs_memory_free_all(mem, free_mask, cname)\
- (*(mem)->procs.free_all)(mem, free_mask, cname)
+ ((mem)->procs.free_all(mem, free_mask, cname))
/* Backward compatibility */
#define gs_free_all(mem)\
gs_memory_free_all(mem, FREE_ALL_DATA, "(free_all)")
+ /*
+ * Consolidate free space. This may be used as part of (or
+ * as an alternative to) garbage collection, or before
+ * giving up on an attempt to allocate.
+ */
+
+#define gs_memory_t_proc_consolidate_free(proc, mem_t)\
+ void proc(P1(mem_t *mem))
+
+#define gs_consolidate_free(mem)\
+ ((mem)->procs.consolidate_free(mem))
+
/* Define the members of the procedure structure. */
#define gs_raw_memory_procs(mem_t)\
gs_memory_t_proc_alloc_bytes((*alloc_bytes_immovable), mem_t);\
gs_memory_t_proc_resize_object((*resize_object), mem_t);\
gs_memory_t_proc_free_object((*free_object), mem_t);\
gs_memory_t_proc_status((*status), mem_t);\
- gs_memory_t_proc_free_all((*free_all), mem_t)
+ gs_memory_t_proc_free_all((*free_all), mem_t);\
+ gs_memory_t_proc_consolidate_free((*consolidate_free), mem_t)
/* Define the procedure vector for a raw memory allocator. */
typedef struct gs_raw_memory_procs_s {