2020-07-05 15:35:34 +02:00
|
|
|
#include "framework.h"
|
|
|
|
#include "malloc.h"
|
2020-07-11 12:34:23 +02:00
|
|
|
#include "door.h"
|
|
|
|
#include "PoolAllocator.h"
|
2020-07-11 17:36:05 +02:00
|
|
|
using namespace T5M::Memory;
|
2020-07-05 15:35:34 +02:00
|
|
|
char* malloc_buffer;
|
|
|
|
int malloc_size;
|
|
|
|
char* malloc_ptr;
|
|
|
|
int malloc_free;
|
|
|
|
int malloc_used;
|
2020-07-11 17:36:05 +02:00
|
|
|
TGPool* gameMemory;
|
2020-07-06 18:56:18 +02:00
|
|
|
void init_game_malloc() noexcept
|
2020-07-05 15:35:34 +02:00
|
|
|
{
|
2020-07-11 17:36:05 +02:00
|
|
|
gameMemory = new TGPool(8 * 1024 * 1024);
|
2020-07-05 15:35:34 +02:00
|
|
|
}
|
|
|
|
|
2020-07-06 18:56:18 +02:00
|
|
|
void game_free(void* ptr) noexcept
|
2020-07-05 15:35:34 +02:00
|
|
|
{
|
|
|
|
gameMemory->free(ptr);
|
|
|
|
}
|