CommonLibSSE (powerof3)
hkContainerAllocators.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 namespace RE
6 {
8  {
9  struct Allocator : public hkMemoryAllocator
10  {
11  inline static constexpr auto RTTI = RTTI_hkContainerHeapAllocator__Allocator;
12  inline static constexpr auto VTABLE = VTABLE_hkContainerHeapAllocator__Allocator;
13 
14  ~Allocator() override; // 00
15 
16  void* BlockAlloc(std::int32_t a_numBytes) override; // 01
17  void BlockFree(void* a_ptr, std::int32_t a_numBytes) override; // 02
18  void* BufAlloc(std::int32_t& a_reqNumBytesInOut) override; // 03
19  void BufFree(void* a_ptr, std::int32_t a_numBytes) override; // 04
20  void GetMemoryStatistics(MemoryStatistics& a_usage) override; // 08
21  std::int32_t GetAllocatedSize(const void* a_obj, std::int32_t a_numBytes) override; // 09
22  };
23  static_assert(sizeof(Allocator) == 0x8);
24 
25  [[nodiscard]] static Allocator* GetSingleton()
26  {
27  static REL::Relocation<hkContainerHeapAllocator::Allocator*> singleton{ RELOCATION_ID(510713, 383828) };
28  return singleton.get();
29  }
30  };
31  static_assert(sizeof(hkContainerHeapAllocator) == 0x1);
32 }
#define RELOCATION_ID(SE, AE)
Definition: PCH.h:505
Definition: Relocation.h:210
Definition: hkMemoryAllocator.h:8
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_hkContainerHeapAllocator__Allocator(static_cast< std::uint64_t >(689587))
constexpr std::array< REL::ID, 1 > VTABLE_hkContainerHeapAllocator__Allocator
Definition: Offsets_VTABLE.h:13773
Definition: hkContainerAllocators.h:10
void * BlockAlloc(std::int32_t a_numBytes) override
std::int32_t GetAllocatedSize(const void *a_obj, std::int32_t a_numBytes) override
void BufFree(void *a_ptr, std::int32_t a_numBytes) override
void GetMemoryStatistics(MemoryStatistics &a_usage) override
void * BufAlloc(std::int32_t &a_reqNumBytesInOut) override
static constexpr auto RTTI
Definition: hkContainerAllocators.h:11
static constexpr auto VTABLE
Definition: hkContainerAllocators.h:12
void BlockFree(void *a_ptr, std::int32_t a_numBytes) override
Definition: hkContainerAllocators.h:8
static Allocator * GetSingleton()
Definition: hkContainerAllocators.h:25
Definition: hkMemoryAllocator.h:22