CommonLibSSE (powerof3)
GMemory.h File Reference
#include "RE/G/GMemoryHeap.h"

Go to the source code of this file.

Classes

class  RE::GMemory
 

Namespaces

 RE
 

Macros

#define GALLOC(a_count)   RE::GMemory::Alloc((a_count))
 
#define GMEMALIGN(a_sz, a_al)   RE::GMemory::Alloc((a_count), (a_al))
 
#define GREALLOC(a_ptr, a_count)   RE::GMemory::Realloc((a_ptr), (a_count))
 
#define GFREE(a_ptr)   RE::GMemory::Free((a_ptr))
 
#define GFREE_ALIGN(a_count)   RE::GMemory::Free((a_count))
 
#define GHEAP_ALLOC(a_heap, a_count)   RE::GMemory::AllocInHeap((a_heap), (a_count))
 
#define GHEAP_MEMALIGN(a_heap, a_count, a_al)   RE::GMemory::AllocInHeap((a_heap), (a_count), (a_al))
 
#define GHEAP_AUTO_ALLOC(a_addr, a_count)   RE::GMemory::AllocAutoHeap((a_addr), (a_count))
 
#define GHEAP_FREE(a_heap, a_ptr)   RE::GMemory::FreeInHeap((a_heap), (a_ptr))
 
#define GFC_MEMORY_REDEFINE_NEW_IMPL(a_className, a_check_delete, a_statType)
 
#define GFC_MEMORY_CHECK_DELETE_NONE(a_className, a_ptr)
 
#define GFC_MEMORY_REDEFINE_NEW(a_className, a_statType)   GFC_MEMORY_REDEFINE_NEW_IMPL(a_className, GFC_MEMORY_CHECK_DELETE_NONE, a_statType)
 

Macro Definition Documentation

◆ GALLOC

#define GALLOC (   a_count)    RE::GMemory::Alloc((a_count))

◆ GFC_MEMORY_CHECK_DELETE_NONE

#define GFC_MEMORY_CHECK_DELETE_NONE (   a_className,
  a_ptr 
)

◆ GFC_MEMORY_REDEFINE_NEW

#define GFC_MEMORY_REDEFINE_NEW (   a_className,
  a_statType 
)    GFC_MEMORY_REDEFINE_NEW_IMPL(a_className, GFC_MEMORY_CHECK_DELETE_NONE, a_statType)

◆ GFC_MEMORY_REDEFINE_NEW_IMPL

#define GFC_MEMORY_REDEFINE_NEW_IMPL (   a_className,
  a_check_delete,
  a_statType 
)
Value:
void* operator new(std::size_t a_count) { return GALLOC(a_count); } \
void* operator new[](std::size_t a_count) { return GALLOC(a_count); } \
void* operator new([[maybe_unused]] std::size_t a_count, void* a_plcmnt) { return a_plcmnt; } \
void* operator new[]([[maybe_unused]] std::size_t a_count, void* a_plcmnt) { return a_plcmnt; } \
void* operator new(std::size_t a_count, RE::GMemoryHeap* a_heap) { return GHEAP_ALLOC(a_heap, a_count); } \
void* operator new[](std::size_t a_count, RE::GMemoryHeap* a_heap) { return GHEAP_ALLOC(a_heap, a_count); } \
void operator delete(void* a_ptr) { GFREE(a_ptr); } \
void operator delete[](void* a_ptr) { GFREE(a_ptr); } \
void operator delete([[maybe_unused]] void* a_ptr, [[maybe_unused]] void* a_plcmnt) {} \
void operator delete[]([[maybe_unused]] void* a_ptr, [[maybe_unused]] void* a_plcmnt) {} \
void operator delete(void* a_ptr, RE::GMemoryHeap* a_heap) { GHEAP_FREE(a_heap, a_ptr); }
#define GHEAP_ALLOC(a_heap, a_count)
Definition: GMemory.h:40
#define GFREE(a_ptr)
Definition: GMemory.h:36
#define GHEAP_FREE(a_heap, a_ptr)
Definition: GMemory.h:43
#define GALLOC(a_count)
Definition: GMemory.h:33
Definition: GMemoryHeap.h:16

◆ GFREE

#define GFREE (   a_ptr)    RE::GMemory::Free((a_ptr))

◆ GFREE_ALIGN

#define GFREE_ALIGN (   a_count)    RE::GMemory::Free((a_count))

◆ GHEAP_ALLOC

#define GHEAP_ALLOC (   a_heap,
  a_count 
)    RE::GMemory::AllocInHeap((a_heap), (a_count))

◆ GHEAP_AUTO_ALLOC

#define GHEAP_AUTO_ALLOC (   a_addr,
  a_count 
)    RE::GMemory::AllocAutoHeap((a_addr), (a_count))

◆ GHEAP_FREE

#define GHEAP_FREE (   a_heap,
  a_ptr 
)    RE::GMemory::FreeInHeap((a_heap), (a_ptr))

◆ GHEAP_MEMALIGN

#define GHEAP_MEMALIGN (   a_heap,
  a_count,
  a_al 
)    RE::GMemory::AllocInHeap((a_heap), (a_count), (a_al))

◆ GMEMALIGN

#define GMEMALIGN (   a_sz,
  a_al 
)    RE::GMemory::Alloc((a_count), (a_al))

◆ GREALLOC

#define GREALLOC (   a_ptr,
  a_count 
)    RE::GMemory::Realloc((a_ptr), (a_count))