Allocator refactor

This commit is contained in:
elasota
2021-04-28 01:46:07 -04:00
parent 472462c535
commit a2d374f650
75 changed files with 473 additions and 253 deletions

12
GpCommon/IGpAllocator.h Normal file
View File

@@ -0,0 +1,12 @@
#pragma once
#include <stdint.h>
#include <stddef.h>
struct IGpAllocator
{
virtual void *Realloc(void *buf, size_t newSize) = 0;
inline void *Alloc(size_t size) { return this->Realloc(nullptr, size); }
inline void Release(void *ptr) { this->Realloc(ptr, 0); }
};