TINSEL: Patch heap_mem to use 512 MiB for Noir.

This is similar to what Kerbox' implementation does, but not
verified to be the precise value needed.
This commit is contained in:
Einar Johan Trøan Sømåen 2021-02-15 23:38:43 +01:00
parent 430e3e4bf6
commit 77692d3d7c
No known key found for this signature in database
GPG Key ID: E78D26458077C9C5

View File

@ -52,7 +52,7 @@ struct MEM_NODE {
// 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()
static const uint32 MemoryPoolSize[3] = {5 * 1024 * 1024, 5 * 1024 * 1024, 10 * 1024 * 1024};
static const uint32 MemoryPoolSize[4] = {5 * 1024 * 1024, 5 * 1024 * 1024, 10 * 1024 * 1024, 512 * 1024 * 1024};
// These vars are reset upon engine destruction
@ -128,6 +128,10 @@ void MemoryInit() {
uint32 size = MemoryPoolSize[0];
if (TinselVersion == TINSEL_V1) size = MemoryPoolSize[1];
else if (TinselVersion == TINSEL_V2) size = MemoryPoolSize[2];
else if (TinselVersion == TINSEL_V3) {
warning("TODO: Find the correct memory pool size for Noir, using 512 MiB for now");
size = MemoryPoolSize[3];
}
g_heapSentinel.size = size;
}