summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/gxbcache.c5
-rw-r--r--base/lib.mak4
2 files changed, 6 insertions, 3 deletions
diff --git a/base/gxbcache.c b/base/gxbcache.c
index adcd9b468..2150aec7f 100644
--- a/base/gxbcache.c
+++ b/base/gxbcache.c
@@ -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);
diff --git a/base/lib.mak b/base/lib.mak
index 0c2dffb9a..368edeb62 100644
--- a/base/lib.mak
+++ b/base/lib.mak
@@ -676,8 +676,8 @@ $(GLOBJ)gxacpath.$(OBJ) : $(GLSRC)gxacpath.c $(AK) $(gx_h)\
$(gzacpath_h) $(gzcpath_h) $(gzpath_h) $(gxdevsop_h) $(LIB_MAK) $(MAKEDIRS)
$(GLCC) $(GLO_)gxacpath.$(OBJ) $(C_) $(GLSRC)gxacpath.c
-$(GLOBJ)gxbcache.$(OBJ) : $(GLSRC)gxbcache.c $(AK) $(gx_h) $(memory__h)\
- $(gsmdebug_h) $(gxbcache_h) $(LIB_MAK) $(MAKEDIRS)
+$(GLOBJ)gxbcache.$(OBJ) : $(GLSRC)gxbcache.c $(AK) $(gx_h) $(gxobj_h) \
+ $(memory__h) $(gsmdebug_h) $(gxbcache_h) $(LIB_MAK) $(MAKEDIRS)
$(GLCC) $(GLO_)gxbcache.$(OBJ) $(C_) $(GLSRC)gxbcache.c
$(GLOBJ)gxccache.$(OBJ) : $(GLSRC)gxccache.c $(AK) $(gx_h)\