Tier1: enable CMemoryStack and fix compile errors in debug

Define missing MemAlloc_* inlines.
This commit is contained in:
Kawe Mazidjatari 2024-01-08 22:59:35 +01:00
parent 5721ffd22b
commit ae681fc118
2 changed files with 10 additions and 1 deletions

View File

@ -10,6 +10,15 @@
#ifndef TIER0_IMEMALLOC_H
#define TIER0_IMEMALLOC_H
inline void* MemAlloc_Alloc(size_t nSize, const char* pFileName = NULL, int nLine = 0) { return malloc(nSize); }
inline void MemAlloc_Free(void* ptr, const char* pFileName = NULL, int nLine = 0) { free(ptr); }
inline void* MemAlloc_AllocAligned(size_t size, size_t align) { return _aligned_malloc(size, align); }
inline void* MemAlloc_AllocAlignedFileLine(size_t size, size_t align, const char* pszFile = NULL, int nLine = 0) { return _aligned_malloc(size, align); }
inline void MemAlloc_FreeAligned(void* pMemBlock, const char* pszFile = NULL, int nLine = 0) { free(pMemBlock); }
//-----------------------------------------------------------------------------
/// This interface class is used to let the mem_dump command retrieve
/// information about memory allocations outside of the heap. It is currently
/// used by CMemoryStack to report on its allocations.

View File

@ -19,7 +19,7 @@ add_sources( SOURCE_GROUP "Utility"
"utlstring.cpp"
"characterset.cpp"
"mempool.cpp"
#"memstack.cpp"
"memstack.cpp"
)
add_sources( SOURCE_GROUP "Private"