CommonLibSSE (powerof3)
GAllocatorBaseLH.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/G/GMemory.h"
4 #include "RE/G/GStats.h"
5 
6 namespace RE
7 {
8  template <std::uint32_t SID = GStatGroup::kGStat_Default_Mem>
10  {
11  public:
12  enum
13  {
14  kStatID = SID
15  };
16 
17  static void* Alloc(const void* a_heapAddr, UPInt a_size)
18  {
19  return GMemory::AllocAutoHeap(a_heapAddr, a_size);
20  }
21 
22  static void* Realloc(void* a_ptr, UPInt a_newSize)
23  {
24  return GMemory::Realloc(a_ptr, a_newSize);
25  }
26 
27  static void Free(void* a_ptr)
28  {
29  GMemory::Free(a_ptr);
30  }
31  };
32  static_assert(sizeof(GAllocatorBaseLH<>) == 0x1);
33 }
Definition: GAllocatorBaseLH.h:10
static void * Realloc(void *a_ptr, UPInt a_newSize)
Definition: GAllocatorBaseLH.h:22
static void Free(void *a_ptr)
Definition: GAllocatorBaseLH.h:27
static void * Alloc(const void *a_heapAddr, UPInt a_size)
Definition: GAllocatorBaseLH.h:17
@ kStatID
Definition: GAllocatorBaseLH.h:14
static void * Realloc(void *a_ptr, UPInt a_newCount)
static void Free(void *a_ptr)
static void * AllocAutoHeap(const void *a_ptr, UPInt a_count)
Definition: AbsorbEffect.h:6
std::size_t UPInt
Definition: SFTypes.h:5