diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2020-09-10 18:10:49 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-09-11 20:06:36 +0200 |
commit | acfc02c1747065fe450c7cfeb6f1844b62335f08 (patch) | |
tree | 5887806a2e6b99bbb0255e013a9028810e230a7f /psi/zvmem2.c | |
parent | Import Ghostscript 9.52 (diff) | |
download | ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.tar.gz ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.tar.bz2 ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.zip |
Import Ghostscript 9.53ghostscript-9.53
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'psi/zvmem2.c')
-rw-r--r-- | psi/zvmem2.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/psi/zvmem2.c b/psi/zvmem2.c index a24c99fb..fe45c900 100644 --- a/psi/zvmem2.c +++ b/psi/zvmem2.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2019 Artifex Software, Inc. +/* Copyright (C) 2001-2020 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -26,8 +26,6 @@ /* Garbage collector control parameters. */ #define DEFAULT_VM_THRESHOLD_SMALL 100000 #define DEFAULT_VM_THRESHOLD_LARGE 8000000 -#define MIN_VM_THRESHOLD 1 -#define MAX_VM_THRESHOLD max_long /* ------ Local/global VM control ------ */ @@ -75,17 +73,17 @@ zgcheck(i_ctx_t *i_ctx_p) * This is implemented as a PostScript procedure that calls setuserparams. */ int -set_vm_threshold(i_ctx_t *i_ctx_p, long val) +set_vm_threshold(i_ctx_t *i_ctx_p, int64_t val) { if (val < -1) return_error(gs_error_rangecheck); else if (val == -1) val = (gs_debug_c('.') ? DEFAULT_VM_THRESHOLD_SMALL : DEFAULT_VM_THRESHOLD_LARGE); - else if (val < MIN_VM_THRESHOLD) - val = MIN_VM_THRESHOLD; - else if (val > MAX_VM_THRESHOLD) - val = MAX_VM_THRESHOLD; +#if PSINT32BIT==1 + else if (val > max_int) + val = max_int +#endif gs_memory_set_vm_threshold(idmemory->space_system, val); gs_memory_set_vm_threshold(idmemory->space_global, val); gs_memory_set_vm_threshold(idmemory->space_local, val); |