CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
NiAllocator.h
Go to the documentation of this file.
1#pragma once
2
3namespace RE
4{
5 enum class NiMemEventType
6 {
7 kUnknown = 0,
8 kOperNew = 1,
10 kOperDelete = 3,
12 kMalloc = 5,
13 kRealloc = 6,
16 kFree = 9,
17 kAlignedFree = 10,
18 kExternalAlloc = 11,
19 kExternalFree = 12
20 };
21
23 {
24 public:
25 inline static constexpr auto RTTI = RTTI_NiAllocator;
26
27 virtual ~NiAllocator(); // 00
28
29 // add
30 virtual void* Allocate(std::size_t& a_sizeInBytes, std::size_t& a_alignment, NiMemEventType a_eventType, bool a_provideAccurateSizeOnDeallocate, const char* a_file, std::int32_t a_line, const char* a_function) = 0; // 01
31 virtual void Deallocate(void* a_memory, NiMemEventType a_eventType, std::size_t a_sizeInBytes) = 0; // 02
32 virtual void* Reallocate(void* a_memory, size_t& a_sizeInBytes, std::size_t& a_alignment, NiMemEventType a_eventType, bool a_provideAccurateSizeOnDeallocate, std::size_t a_sizeCurrent, const char* a_file, std::int32_t a_line, const char* a_function) = 0; // 03
33 virtual bool TrackAllocate(const void* const a_memory, std::size_t a_sizeInBytes, NiMemEventType a_eventType, const char* a_file, std::int32_t a_line, const char* a_function) = 0; // 04
34 virtual bool TrackDeallocate(const void* const a_memory, NiMemEventType a_eventType) = 0; // 05
35 virtual void Unk_06(void) = 0; // 06
36 virtual void Initialize() = 0; // 07
37 virtual void Shutdown() = 0; // 08
38 virtual bool VerifyAddress(const void* a_memory) = 0; // 09
39 };
40 static_assert(sizeof(NiAllocator) == 0x8);
41}
Definition: NiAllocator.h:23
virtual void Deallocate(void *a_memory, NiMemEventType a_eventType, std::size_t a_sizeInBytes)=0
virtual void Unk_06(void)=0
virtual void Shutdown()=0
virtual void * Reallocate(void *a_memory, size_t &a_sizeInBytes, std::size_t &a_alignment, NiMemEventType a_eventType, bool a_provideAccurateSizeOnDeallocate, std::size_t a_sizeCurrent, const char *a_file, std::int32_t a_line, const char *a_function)=0
virtual bool TrackDeallocate(const void *const a_memory, NiMemEventType a_eventType)=0
static constexpr auto RTTI
Definition: NiAllocator.h:25
virtual ~NiAllocator()
virtual void * Allocate(std::size_t &a_sizeInBytes, std::size_t &a_alignment, NiMemEventType a_eventType, bool a_provideAccurateSizeOnDeallocate, const char *a_file, std::int32_t a_line, const char *a_function)=0
virtual void Initialize()=0
virtual bool VerifyAddress(const void *a_memory)=0
virtual bool TrackAllocate(const void *const a_memory, std::size_t a_sizeInBytes, NiMemEventType a_eventType, const char *a_file, std::int32_t a_line, const char *a_function)=0
Definition: AbsorbEffect.h:6
NiMemEventType
Definition: NiAllocator.h:6
constexpr REL::ID RTTI_NiAllocator
Definition: Offsets_RTTI.h:5299