summaryrefslogtreecommitdiffstats
path: root/src/core/Pools.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-12-19 01:21:04 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-12-19 01:21:04 +0100
commit8d1996833bd73271ca14a3df46633d9b2ed13052 (patch)
treedaedb1622096e5bb6b8b9ec15882769b827506e1 /src/core/Pools.cpp
parentget rid of all PED_SKIN defines (diff)
parentlittle cleanup of templates (diff)
downloadre3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar
re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.gz
re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.bz2
re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.lz
re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.xz
re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.zst
re3-8d1996833bd73271ca14a3df46633d9b2ed13052.zip
Diffstat (limited to 'src/core/Pools.cpp')
-rw-r--r--src/core/Pools.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/core/Pools.cpp b/src/core/Pools.cpp
index cbc57902..68e6f391 100644
--- a/src/core/Pools.cpp
+++ b/src/core/Pools.cpp
@@ -13,6 +13,7 @@
#include "Streaming.h"
#include "Wanted.h"
#include "World.h"
+#include "MemoryHeap.h"
//--MIAMI: file done
@@ -27,19 +28,38 @@ CDummyPool *CPools::ms_pDummyPool;
CAudioScriptObjectPool *CPools::ms_pAudioScriptObjectPool;
CColModelPool *CPools::ms_pColModelPool;
+#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, "PtrNode");
+ CHECKMEM("after CPtrNodePool");
ms_pEntryInfoNodePool = new CEntryInfoNodePool(NUMENTRYINFOS, "EntryInfoNode");
+ CHECKMEM("after CEntryInfoNodePool");
ms_pPedPool = new CPedPool(NUMPEDS, "Peds");
+ CHECKMEM("after CPedPool");
ms_pVehiclePool = new CVehiclePool(NUMVEHICLES, "Vehicles");
+ CHECKMEM("after CVehiclePool");
ms_pBuildingPool = new CBuildingPool(NUMBUILDINGS, "Buildings");
+ CHECKMEM("after CBuildingPool");
ms_pTreadablePool = new CTreadablePool(NUMTREADABLES, "Treadables");
+ CHECKMEM("after CTreadablePool");
ms_pObjectPool = new CObjectPool(NUMOBJECTS, "Objects");
+ CHECKMEM("after CObjectPool");
ms_pDummyPool = new CDummyPool(NUMDUMMIES, "Dummys");
+ CHECKMEM("after CDummyPool");
ms_pAudioScriptObjectPool = new CAudioScriptObjectPool(NUMAUDIOSCRIPTOBJECTS, "AudioScriptObj");
+ CHECKMEM("after cAudioScriptObjectPool");
ms_pColModelPool = new CColModelPool(NUMCOLMODELS, "ColModel");
+ CHECKMEM("after pools");
+ POP_MEMID();
}
void