From 94b914b0cb3c1644f031212225e53ea7f5a8bb9b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 21 Dec 2008 12:30:30 +0000 Subject: Reduced the memory allocated for DW1 and DW1 demo by 5MB svn-id: r35464 --- engines/tinsel/actors.cpp | 1 + engines/tinsel/heapmem.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'engines/tinsel') diff --git a/engines/tinsel/actors.cpp b/engines/tinsel/actors.cpp index c151bdac9b..c2402285b8 100644 --- a/engines/tinsel/actors.cpp +++ b/engines/tinsel/actors.cpp @@ -173,6 +173,7 @@ void RegisterActors(int num) { // 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); diff --git a/engines/tinsel/heapmem.cpp b/engines/tinsel/heapmem.cpp index 78c020eb74..c06313da20 100644 --- a/engines/tinsel/heapmem.cpp +++ b/engines/tinsel/heapmem.cpp @@ -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]; -- cgit v1.2.3