[Scummvm-cvs-logs] SF.net SVN: scummvm:[35527] scummvm/trunk/engines/tinsel/heapmem.cpp
joostp at users.sourceforge.net
joostp at users.sourceforge.net
Wed Dec 24 17:10:55 CET 2008
Revision: 35527
http://scummvm.svn.sourceforge.net/scummvm/?rev=35527&view=rev
Author: joostp
Date: 2008-12-24 16:10:55 +0000 (Wed, 24 Dec 2008)
Log Message:
-----------
on systems that need alignment, allocate chunks that are a multiple of 4 to ensure we get aligned chunks.
Otherwise, some pNode structs will be dereferenced from unaligned addresses.
Modified Paths:
--------------
scummvm/trunk/engines/tinsel/heapmem.cpp
Modified: scummvm/trunk/engines/tinsel/heapmem.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/heapmem.cpp 2008-12-24 15:57:43 UTC (rev 35526)
+++ scummvm/trunk/engines/tinsel/heapmem.cpp 2008-12-24 16:10:55 UTC (rev 35527)
@@ -284,6 +284,10 @@
HeapCompact(MAX_INT, false);
}
+#ifdef SCUMM_NEED_ALIGNMENT
+ size = (size + 3) & ~3;
+#endif
+
while ((flags & DWM_NOALLOC) == 0 && bCompacted) {
// search the heap for a free block
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list