CommonLibVR
NiMemManager.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/N/NiAllocator.h"
4 
5 namespace RE
6 {
8  {
9  public:
11 
12  void* Allocate(std::size_t a_sizeInBytes, std::size_t a_alignment, NiMemEventType a_eventType, bool a_provideAccurateSizeOnDeallocate = false, const char* a_sourceFile = nullptr, std::int32_t a_sourceLine = -1, const char* a_function = nullptr);
13  void Deallocate(void* a_mem, NiMemEventType a_eventType, std::size_t a_sizeinBytes = static_cast<std::size_t>(-1));
14  void* Reallocate(void* a_mem, std::size_t a_sizeInBytes, std::size_t a_alignment, NiMemEventType a_eventType, bool a_provideAccurateSizeOnDeallocate = false, std::size_t a_sizeCurrent = static_cast<std::size_t>(-1), const char* a_sourceFile = nullptr, std::int32_t a_sourceLine = -1, const char* a_function = nullptr);
15  bool TrackAllocate(const void* const a_mem, std::size_t a_sizeInBytes, NiMemEventType a_eventType, const char* a_sourceFile = nullptr, std::int32_t a_sourceLine = -1, const char* a_function = nullptr);
16  bool TrackDeallocate(const void* const a_mem, NiMemEventType a_eventType);
17 
18  // members
20  private:
21  KEEP_FOR_RE()
22  };
23  static_assert(sizeof(NiMemManager) == 0x8);
24 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: NiAllocator.h:23
Definition: NiMemManager.h:8
static NiMemManager * GetSingleton()
void * Allocate(std::size_t a_sizeInBytes, std::size_t a_alignment, NiMemEventType a_eventType, bool a_provideAccurateSizeOnDeallocate=false, const char *a_sourceFile=nullptr, std::int32_t a_sourceLine=-1, const char *a_function=nullptr)
bool TrackDeallocate(const void *const a_mem, NiMemEventType a_eventType)
bool TrackAllocate(const void *const a_mem, std::size_t a_sizeInBytes, NiMemEventType a_eventType, const char *a_sourceFile=nullptr, std::int32_t a_sourceLine=-1, const char *a_function=nullptr)
NiAllocator * allocator
Definition: NiMemManager.h:19
void Deallocate(void *a_mem, NiMemEventType a_eventType, std::size_t a_sizeinBytes=static_cast< std::size_t >(-1))
void * Reallocate(void *a_mem, std::size_t a_sizeInBytes, std::size_t a_alignment, NiMemEventType a_eventType, bool a_provideAccurateSizeOnDeallocate=false, std::size_t a_sizeCurrent=static_cast< std::size_t >(-1), const char *a_sourceFile=nullptr, std::int32_t a_sourceLine=-1, const char *a_function=nullptr)
Definition: AbsorbEffect.h:6
NiMemEventType
Definition: NiAllocator.h:6