This commit is contained in:
elasota
2021-05-07 20:11:58 -04:00
parent a7cf9d48e3
commit 08c6fd5108
2 changed files with 12 additions and 12 deletions

View File

@@ -3,8 +3,8 @@
#include "IGpAllocator.h"
class GpAllocator_C final : public IGpAllocator
{
public:
{
public:
void *Realloc(void *buf, size_t newSize) override;
static GpAllocator_C *GetInstance();

View File

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