summaryrefslogtreecommitdiff
path: root/base/gsmemraw.h
diff options
context:
space:
mode:
authorRay Johnston <ray.johnston@artifex.com>2016-04-19 12:05:58 -0700
committerRay Johnston <ray.johnston@artifex.com>2016-04-19 12:05:58 -0700
commit43a88f4e6377fa6d4ea0a609450ddb19ee0474cb (patch)
tree1c0ba78cdbd1fe7ce688993afbbcae7e058aff29 /base/gsmemraw.h
parent4976a1a4a0b44cd44467e6fe2ba5d453e7573434 (diff)
downloadghostpdl-43a88f4e6377fa6d4ea0a609450ddb19ee0474cb.tar.gz
Add max_used to gs_memory_status and use it for -Z: resource usage
By adding this to the gs_memory_status_t and returning it (if available) from the gs_memory_status function of allocators, we can print the max used even when it is not a DEBUG build and avoid the ugly gs_debug hack previously used to print the max_used for a DEBUG build. The time for tracking this is microscopic. Also the chunk_mem allocator now tracks this always, not just for DEBUG builds.
Diffstat (limited to 'base/gsmemraw.h')
-rw-r--r--base/gsmemraw.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/base/gsmemraw.h b/base/gsmemraw.h
index 855dc76f4..a6bddac5c 100644
--- a/base/gsmemraw.h
+++ b/base/gsmemraw.h
@@ -55,6 +55,7 @@ typedef struct gs_memory_status_s {
* plus overhead.
*/
ulong used;
+ ulong max_used;
/* used when wrapping if underlying allocator must be thread safe */
bool is_thread_safe;
} gs_memory_status_t;