From fe0893ffb589da617442015b97a62c117ac5bed4 Mon Sep 17 00:00:00 2001 From: maybegreat48 <96936658+maybegreat48@users.noreply.github.com> Date: Sat, 22 Jul 2023 20:49:13 +0000 Subject: [PATCH] Fix sysMemAllocator (#129) --- rage/sysMemAllocator.hpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/rage/sysMemAllocator.hpp b/rage/sysMemAllocator.hpp index 38df0a9..54e8ea7 100644 --- a/rage/sysMemAllocator.hpp +++ b/rage/sysMemAllocator.hpp @@ -1,25 +1,25 @@ #pragma once #include +#include "base/atRTTI.hpp" namespace rage { - class sysMemAllocator - { - public: - virtual ~sysMemAllocator() = 0; + class sysMemAllocator + { + public: + DEFINE_RAGE_RTTI(rage::sysMemAllocator); + virtual void SetQuitOnFail(bool) = 0; + virtual void* Allocate(std::size_t size, std::size_t align, int subAllocator) = 0; + virtual void* TryAllocate(std::size_t size, std::size_t align, int subAllocator) = 0; + virtual void Free(void* pointer) = 0; + virtual void TryFree(void* pointer) = 0; + virtual void Resize(void* pointer, std::size_t size) = 0; + virtual sysMemAllocator* GetAllocator(int allocator) const = 0; + virtual sysMemAllocator* GetAllocator(int allocator) = 0; + virtual sysMemAllocator* GetPointerOwner(void* pointer) = 0; + virtual std::size_t GetSize(void* pointer) const = 0; + virtual std::size_t GetMemoryUsed(int memoryBucket) = 0; + virtual std::size_t GetMemoryAvailable() = 0; - virtual void SetQuitOnFail(bool) = 0; - virtual void* Allocate(std::size_t size, std::size_t align, int subAllocator) = 0; - virtual void* TryAllocate(std::size_t size, std::size_t align, int subAllocator) = 0; - virtual void Free(void* pointer) = 0; - virtual void TryFree(void* pointer) = 0; - virtual void Resize(void* pointer, std::size_t size) = 0; - virtual sysMemAllocator* GetAllocator(int allocator) const = 0; - virtual sysMemAllocator* GetAllocator(int allocator) = 0; - virtual sysMemAllocator* GetPointerOwner(void* pointer) = 0; - virtual std::size_t GetSize(void* pointer) const = 0; - virtual std::size_t GetMemoryUsed(int memoryBucket) = 0; - virtual std::size_t GetMemoryAvailable() = 0; - - }; + }; } \ No newline at end of file