From 1218dd866e58a0bfec14feeb651ea1263054bb3e Mon Sep 17 00:00:00 2001 From: Mark Olsen Date: Tue, 17 Aug 2010 09:35:40 +0000 Subject: [PATCH] qccHunkAlloc(): Round block sizes up to the next 8 to make sure all blocks returned are aligned at least to that size. Fixes problems with alignment exceptions occuring on MIPS/Irix and should also improve performance on those systems that silently emulate badly aligned data accesses. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3589 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/qclib/comprout.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/qclib/comprout.c b/engine/qclib/comprout.c index e42d7209..a2a7a3bd 100644 --- a/engine/qclib/comprout.c +++ b/engine/qclib/comprout.c @@ -26,6 +26,8 @@ int qcchunksize; char *qcchunk; void *qccHunkAlloc(size_t mem) { + mem = (mem + 7)&~7; + qccalloced+=mem; if (qccalloced > qcchunksize) QCC_Error(ERR_INTERNAL, "Compile hunk was filled");