diff options
Diffstat (limited to 'base/gxbcache.c')
-rw-r--r-- | base/gxbcache.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/base/gxbcache.c b/base/gxbcache.c index adcd9b46..184c7647 100644 --- a/base/gxbcache.c +++ b/base/gxbcache.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2020 Artifex Software, Inc. +/* Copyright (C) 2001-2021 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -18,6 +18,7 @@ #include "memory_.h" #include "stdint_.h" #include "gx.h" +#include "gxobj.h" #include "gsmdebug.h" #include "gxbcache.h" @@ -59,8 +60,10 @@ gx_bits_cache_chunk_init(gx_bits_cache_chunk * bck, byte * data, uint size) /* If there isn't enough room, set *pcbh to an entry requiring freeing, */ /* or to 0 if we are at the end of the chunk, and return -1. */ int -gx_bits_cache_alloc(gx_bits_cache * bc, ulong lsize, gx_cached_bits_head ** pcbh) +gx_bits_cache_alloc(gx_bits_cache * bc, ulong lsize0, gx_cached_bits_head ** pcbh) { + ulong lsize = ROUND_UP(lsize0, obj_align_mod); + #define ssize ((uint)lsize) ulong lsize1 = lsize + sizeof(gx_cached_bits_head); |