summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2009-10-30 08:42:35 +0000
committerAndrey Nazarov <skuller@skuller.net>2009-10-30 08:42:35 +0000
commit43fd375826fb82600a5d687425e4ad8431ec4e73 (patch)
tree5200277869bf3dd00d7cca4a75f3f878fd377f6a
parente457a459c4ba86d1f378e75af4f119c1ec94c064 (diff)
Assume 64 byte cachelines when doing Hunk_Alloc.
-rw-r--r--source/sys_unix.c2
-rw-r--r--source/sys_win.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/sys_unix.c b/source/sys_unix.c
index f03fd80..c2a5eab 100644
--- a/source/sys_unix.c
+++ b/source/sys_unix.c
@@ -417,7 +417,7 @@ void *Hunk_Alloc( mempool_t *pool, size_t size ) {
void *buf;
// round to cacheline
- size = ( size + 31 ) & ~31;
+ size = ( size + 63 ) & ~63;
if( pool->cursize + size > pool->maxsize ) {
Com_Error( ERR_FATAL, "%s: unable to allocate %"PRIz" bytes out of %"PRIz,
__func__, size, pool->maxsize );
diff --git a/source/sys_win.c b/source/sys_win.c
index 85cf9f8..1980827 100644
--- a/source/sys_win.c
+++ b/source/sys_win.c
@@ -539,7 +539,7 @@ void *Hunk_Alloc( mempool_t *pool, size_t size ) {
void *buf;
// round to cacheline
- size = ( size + 31 ) & ~ 31;
+ size = ( size + 63 ) & ~63;
pool->cursize += size;
if( pool->cursize > pool->maxsize )