From 43a88f4e6377fa6d4ea0a609450ddb19ee0474cb Mon Sep 17 00:00:00 2001 From: Ray Johnston Date: Tue, 19 Apr 2016 12:05:58 -0700 Subject: 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. --- base/gsmemraw.h | 1 + 1 file changed, 1 insertion(+) (limited to 'base/gsmemraw.h') 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; -- cgit v1.2.1