Temp-Classes/rage/sysMemAllocator.hpp
Yimura d81f392e61 Script VM classes (#60)
* feat(Script): Ported BBv2 script classes
* fix: Change hard tab indents to 4 width space indents
2022-11-08 21:11:50 +00:00

25 lines
932 B
C++

#pragma once
#include <cstddef>
namespace rage
{
class sysMemAllocator
{
public:
virtual ~sysMemAllocator() = 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;
};
}