aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/tinsel/actors.cpp1
-rw-r--r--engines/tinsel/heapmem.cpp6
2 files changed, 5 insertions, 2 deletions
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];