summaryrefslogtreecommitdiff
path: root/base/gxccman.c
diff options
context:
space:
mode:
Diffstat (limited to 'base/gxccman.c')
-rw-r--r--base/gxccman.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/base/gxccman.c b/base/gxccman.c
index b2d84305a..29880b224 100644
--- a/base/gxccman.c
+++ b/base/gxccman.c
@@ -34,6 +34,7 @@
#include "gxxfont.h"
#include "gxttfb.h"
#include "gxfont42.h"
+#include "gxobj.h"
/* Define the descriptors for the cache structures. */
private_st_cached_fm_pair();
@@ -932,8 +933,8 @@ alloc_char(gs_font_dir * dir, ulong icdsize, cached_char **pcc)
gs_memory_t *mem = dir->ccache.bits_memory;
char_cache_chunk *cck_prev = dir->ccache.chunks;
char_cache_chunk *cck;
- uint cksize = dir->ccache.bmax / 5 + 1;
- uint tsize = dir->ccache.bmax - dir->ccache.bspace;
+ uint cksize = ROUND_UP(dir->ccache.bmax / 5 + 1, obj_align_mod);
+ uint tsize = ROUND_UP(dir->ccache.bmax - dir->ccache.bspace, obj_align_mod);
byte *cdata;
if (cksize > tsize)