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
This commit is contained in:
Mark Olsen 2010-08-17 09:35:40 +00:00
parent 342225fe9f
commit 1218dd866e

View file

@ -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");