[Stats] Use stack buffer instead of heap memory

This commit is contained in:
momo5502 2017-02-28 13:36:38 +01:00
parent 1267a4a9f3
commit a057552afc

View File

@ -19,13 +19,12 @@ namespace Components
// alloc // alloc
Game::msg_t msg; Game::msg_t msg;
char buffer[2048];
ZeroMemory(&msg, sizeof(msg)); ZeroMemory(&msg, sizeof(msg));
ZeroMemory(&buffer, sizeof(buffer));
Utils::Memory::Allocator allocator;
char* buffer = allocator.allocateArray<char>(2048);
// init // init
Game::MSG_Init(&msg, buffer, 2048); Game::MSG_Init(&msg, buffer, sizeof(buffer));
Game::MSG_WriteString(&msg, "stats"); Game::MSG_WriteString(&msg, "stats");
// get stat buffer // get stat buffer