Use zone allocator instead of static mem allocator

This commit is contained in:
FutureRave
2022-01-27 17:11:21 +00:00
parent 18dca4506f
commit 3bb39483dc
3 changed files with 28 additions and 19 deletions

View File

@ -81,10 +81,12 @@ namespace Utils
this->pool.push_back(data);
return data;
}
template <typename T> inline T* allocate()
{
return this->allocateArray<T>(1);
}
template <typename T> inline T* allocateArray(size_t count = 1)
{
return static_cast<T*>(this->allocate(count * sizeof(T)));