CommonLibVR
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 inline static constexpr auto VTABLE = VTABLE_NiAllocator;
27
28 virtual ~NiAllocator(); // 00
29
30 // add
31 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
32 virtual void Deallocate(void* a_memory, NiMemEventType a_eventType, std::size_t a_sizeInBytes) = 0; // 02
33 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
34 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
35 virtual bool TrackDeallocate(const void* const a_memory, NiMemEventType a_eventType) = 0; // 05
36 virtual void Unk_06(void) = 0; // 06
37 virtual void Initialize() = 0; // 07
38 virtual void Shutdown() = 0; // 08
39 virtual bool VerifyAddress(const void* a_memory) = 0; // 09
40 private:
42 };
43 static_assert(sizeof(NiAllocator) == 0x8);
44}
#define KEEP_FOR_RE()
Definition PCH.h:517
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
static constexpr auto VTABLE
Definition NiAllocator.h:26
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(static_cast< std::uint64_t >(690322))
constexpr std::array< REL::ID, 1 > VTABLE_NiAllocator
Definition Offsets_VTABLE.h:12145