2020-07-05 15:35:34 +02:00
|
|
|
#include "framework.h"
|
|
|
|
#include "malloc.h"
|
|
|
|
#include "qmalloc.h"
|
|
|
|
#if REPLACE_HEAP_MEMORY
|
|
|
|
#include <new>
|
|
|
|
#endif
|
|
|
|
char* malloc_buffer;
|
|
|
|
int malloc_size;
|
|
|
|
char* malloc_ptr;
|
|
|
|
int malloc_free;
|
|
|
|
int malloc_used;
|
|
|
|
using namespace T5M::Memory;
|
2020-07-05 22:19:06 +02:00
|
|
|
MemoryPool* gameMemory;
|
2020-07-05 15:35:34 +02:00
|
|
|
|
2020-07-06 18:56:18 +02:00
|
|
|
void init_game_malloc() noexcept
|
2020-07-05 15:35:34 +02:00
|
|
|
{
|
2020-07-06 18:56:18 +02:00
|
|
|
gameMemory = new MemoryPool(MemoryUnit::MebiByte, 196, 128);
|
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);
|
|
|
|
}
|