[Scummvm-cvs-logs] SF.net SVN: scummvm:[35464] scummvm/trunk/engines/tinsel

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Dec 21 13:30:34 CET 2008


Revision: 35464
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35464&view=rev
Author:   thebluegr
Date:     2008-12-21 12:30:30 +0000 (Sun, 21 Dec 2008)

Log Message:
-----------
Reduced the memory allocated for DW1 and DW1 demo by 5MB

Modified Paths:
--------------
    scummvm/trunk/engines/tinsel/actors.cpp
    scummvm/trunk/engines/tinsel/heapmem.cpp

Modified: scummvm/trunk/engines/tinsel/actors.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/actors.cpp	2008-12-21 12:21:29 UTC (rev 35463)
+++ scummvm/trunk/engines/tinsel/actors.cpp	2008-12-21 12:30:30 UTC (rev 35464)
@@ -173,6 +173,7 @@
 
 		// FIXME: For now, we always allocate MAX_SAVED_ALIVES blocks,
 		//   as this makes the save/load code simpler
+		// size of ACTORINFO is 148, so this allocates 512 * 148 = 75776 bytes, about 74KB
 		actorInfo = (ACTORINFO *)calloc(MAX_SAVED_ALIVES, sizeof(ACTORINFO));
 		if (TinselV2)
 			zFactors = (uint8 *)malloc(MAX_SAVED_ALIVES);

Modified: scummvm/trunk/engines/tinsel/heapmem.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/heapmem.cpp	2008-12-21 12:21:29 UTC (rev 35463)
+++ scummvm/trunk/engines/tinsel/heapmem.cpp	2008-12-21 12:30:30 UTC (rev 35464)
@@ -31,8 +31,10 @@
 namespace Tinsel {
 
 // Specifies the total amount of memory required for DW1 demo, DW1, or DW2 respectively.
-// Currently this is set at 10Mb for all three - this could probably be reduced somewhat
-uint32 MemoryPoolSize[3] = {10 * 1024 * 1024, 10 * 1024 * 1024, 10 * 1024 * 1024};
+// Currently this is set at 5MB for the DW1 demo and DW1 and 10MB for DW2
+// This could probably be reduced somewhat
+// If the memory is not enough, the engine throws an "Out of memory" error in handle.cpp inside LockMem()
+uint32 MemoryPoolSize[3] = {5 * 1024 * 1024, 5 * 1024 * 1024, 10 * 1024 * 1024};
 
 // list of all memory nodes
 MEM_NODE mnodeList[NUM_MNODES];


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