summaryrefslogtreecommitdiffstats
path: root/src/core/Pools.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-11-26 16:47:19 +0100
committeraap <aap@papnet.eu>2020-11-26 17:39:59 +0100
commitd857758c167ee06840ec806524191e95ff37f98a (patch)
treefcfdf828156ae6e394ba768756629906f9d73eab /src/core/Pools.cpp
parentmemory heap starting to work (diff)
downloadre3-d857758c167ee06840ec806524191e95ff37f98a.tar
re3-d857758c167ee06840ec806524191e95ff37f98a.tar.gz
re3-d857758c167ee06840ec806524191e95ff37f98a.tar.bz2
re3-d857758c167ee06840ec806524191e95ff37f98a.tar.lz
re3-d857758c167ee06840ec806524191e95ff37f98a.tar.xz
re3-d857758c167ee06840ec806524191e95ff37f98a.tar.zst
re3-d857758c167ee06840ec806524191e95ff37f98a.zip
Diffstat (limited to 'src/core/Pools.cpp')
-rw-r--r--src/core/Pools.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/core/Pools.cpp b/src/core/Pools.cpp
index bd0814d0..79841c14 100644
--- a/src/core/Pools.cpp
+++ b/src/core/Pools.cpp
@@ -12,6 +12,7 @@
#include "Streaming.h"
#include "Wanted.h"
#include "World.h"
+#include "MemoryHeap.h"
CCPtrNodePool *CPools::ms_pPtrNodePool;
CEntryInfoNodePool *CPools::ms_pEntryInfoNodePool;
@@ -23,18 +24,36 @@ CObjectPool *CPools::ms_pObjectPool;
CDummyPool *CPools::ms_pDummyPool;
CAudioScriptObjectPool *CPools::ms_pAudioScriptObjectPool;
+#ifdef GTA_PS2 // or USE_CUSTOM_ALLOCATOR
+#define CHECKMEM(msg) CMemCheck::AllocateMemCheckBlock(msg)
+#else
+#define CHECKMEM(msg)
+#endif
+
void
CPools::Initialise(void)
{
+ PUSH_MEMID(MEMID_POOLS);
+ CHECKMEM("before pools");
ms_pPtrNodePool = new CCPtrNodePool(NUMPTRNODES);
+ CHECKMEM("after CPtrNodePool");
ms_pEntryInfoNodePool = new CEntryInfoNodePool(NUMENTRYINFOS);
+ CHECKMEM("after CEntryInfoNodePool");
ms_pPedPool = new CPedPool(NUMPEDS);
+ CHECKMEM("after CPedPool");
ms_pVehiclePool = new CVehiclePool(NUMVEHICLES);
+ CHECKMEM("after CVehiclePool");
ms_pBuildingPool = new CBuildingPool(NUMBUILDINGS);
+ CHECKMEM("after CBuildingPool");
ms_pTreadablePool = new CTreadablePool(NUMTREADABLES);
+ CHECKMEM("after CTreadablePool");
ms_pObjectPool = new CObjectPool(NUMOBJECTS);
+ CHECKMEM("after CObjectPool");
ms_pDummyPool = new CDummyPool(NUMDUMMIES);
+ CHECKMEM("after CDummyPool");
ms_pAudioScriptObjectPool = new CAudioScriptObjectPool(NUMAUDIOSCRIPTOBJECTS);
+ CHECKMEM("after pools");
+ POP_MEMID();
}
void