mirror of
https://github.com/Mr-X-GTA/GTAV-Classes-1.git
synced 2024-12-22 14:37:31 +08:00
Fix sysMemAllocator (#129)
This commit is contained in:
parent
d1e6b3b7b9
commit
9583d2f7e3
@ -1,25 +1,25 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
#include "base/atRTTI.hpp"
|
||||||
|
|
||||||
namespace rage
|
namespace rage
|
||||||
{
|
{
|
||||||
class sysMemAllocator
|
class sysMemAllocator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~sysMemAllocator() = 0;
|
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;
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user