diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2017-04-04 14:43:05 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2017-04-06 16:47:58 +0100 |
commit | 47417a5cbfbfa3d7bb9ee387909246cdd265d4ff (patch) | |
tree | 06f0124dafea310ee111f512ab8ca6510749d85f | |
parent | bfa6b2ecbe48edc69a7d9d22a12419aed25960b8 (diff) | |
download | ghostpdl-47417a5cbfbfa3d7bb9ee387909246cdd265d4ff.tar.gz |
gs_malloc_memory_t: change type of limit/used/max_used
The limit, used and max_used values in gs_malloc_memory_t were type ulong,
giving rise to differences between LP64 systems (Unix-like) and LLP64 systems
(MS Windows).
So, make them uint64_t for consistency across platforms.
-rw-r--r-- | base/gsalloc.c | 6 | ||||
-rw-r--r-- | base/gsmalloc.c | 2 | ||||
-rw-r--r-- | base/gsmalloc.h | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/base/gsalloc.c b/base/gsalloc.c index 46df2ac2b..3838fd858 100644 --- a/base/gsalloc.c +++ b/base/gsalloc.c @@ -774,7 +774,7 @@ ialloc_alloc_state(gs_memory_t * parent, uint clump_size) #endif iimem->is_controlled = false; iimem->gc_status.vm_threshold = clump_size * 3L; - iimem->gc_status.max_vm = max_long; + iimem->gc_status.max_vm = max_int64_t; iimem->gc_status.signal_value = 0; iimem->gc_status.enabled = false; iimem->gc_status.requested = 0; @@ -861,8 +861,8 @@ ialloc_add_clump(gs_ref_memory_t *imem, ulong space, client_name_t cname) /* Allow acquisition of this clump. */ imem->is_controlled = false; imem->large_size = imem->clump_size; - imem->limit = max_long; - imem->gc_status.max_vm = max_long; + imem->limit = max_int64_t; + imem->gc_status.max_vm = max_int64_t; /* Acquire the clump. */ cp = alloc_add_clump(imem, space, cname); diff --git a/base/gsmalloc.c b/base/gsmalloc.c index 550ca7afb..f0fe27b2d 100644 --- a/base/gsmalloc.c +++ b/base/gsmalloc.c @@ -115,7 +115,7 @@ gs_malloc_memory_init(void) mem->stable_memory = 0; /* just for tidyness, never referenced */ mem->procs = gs_malloc_memory_procs; mem->allocated = 0; - mem->limit = max_long; + mem->limit = max_int64_t; mem->used = 0; mem->max_used = 0; mem->gs_lib_ctx = 0; diff --git a/base/gsmalloc.h b/base/gsmalloc.h index 313185431..f1acf3d7e 100644 --- a/base/gsmalloc.h +++ b/base/gsmalloc.h @@ -27,9 +27,9 @@ typedef struct gs_malloc_block_s gs_malloc_block_t; typedef struct gs_malloc_memory_s { gs_memory_common; gs_malloc_block_t *allocated; - ulong limit; - ulong used; - ulong max_used; + uint64_t limit; + uint64_t used; + uint64_t max_used; gx_monitor_t *monitor; /* monitor to serialize access to functions */ } gs_malloc_memory_t; |