First pass memory tool

This commit is contained in:
2023-10-10 08:55:50 -05:00
parent 2423fd9f70
commit 9ad9995663
11 changed files with 183 additions and 99 deletions

View File

@ -5,18 +5,13 @@
#include "DawnHostTux32.hpp"
#if DAWN_DEBUG_BUILD
uint64_t dawnAllocatedItemCount;
#endif
using namespace Dawn;
int32_t main(int32_t argc, char **args) {
int32_t result;
#if DAWN_DEBUG_BUILD
dawnAllocatedItemCount = 0;
#endif
// Init the memory system.
memoryInit();
// Create the host
auto host = new DawnHost();
@ -47,10 +42,8 @@ int32_t main(int32_t argc, char **args) {
delete game;
delete host;
#if DAWN_DEBUG_BUILD
assertTrue(dawnAllocatedItemCount == 0, "DawnHostTux32: Failed to free all allocated items.");
#endif
memoryDispose();
// Success
return 0;