diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-03-26 18:40:00 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-03-26 18:40:00 +0000 |
| commit | 09b9f1dc1ec69683c3143f309e6e8a0141361624 (patch) | |
| tree | b6f1a63031e72e09d313f681a311eb3043405441 /Common/src | |
| parent | Fixed latest MSVC (19.25.28610.4) build issue (diff) | |
| download | DiligentCore-09b9f1dc1ec69683c3143f309e6e8a0141361624.tar.gz DiligentCore-09b9f1dc1ec69683c3143f309e6e8a0141361624.zip | |
Renamed _DEBUG and DEVELOPMENT macros to DILGENT_DEBUG and DILIGENT_DEVELOPMENT
Diffstat (limited to 'Common/src')
| -rw-r--r-- | Common/src/DefaultRawMemoryAllocator.cpp | 8 | ||||
| -rw-r--r-- | Common/src/FixedBlockMemoryAllocator.cpp | 2 |
2 files changed, 1 insertions, 9 deletions
diff --git a/Common/src/DefaultRawMemoryAllocator.cpp b/Common/src/DefaultRawMemoryAllocator.cpp index 251f83cc..38840360 100644 --- a/Common/src/DefaultRawMemoryAllocator.cpp +++ b/Common/src/DefaultRawMemoryAllocator.cpp @@ -37,20 +37,12 @@ DefaultRawMemoryAllocator::DefaultRawMemoryAllocator() void* DefaultRawMemoryAllocator::Allocate(size_t Size, const Char* dbgDescription, const char* dbgFileName, const Int32 dbgLineNumber) { -#ifdef _DEBUG - return new Uint8[Size + 16] + 16; -#else return new Uint8[Size]; -#endif } void DefaultRawMemoryAllocator::Free(void* Ptr) { -#ifdef _DEBUG - delete[](reinterpret_cast<Uint8*>(Ptr) - 16); -#else delete[] reinterpret_cast<Uint8*>(Ptr); -#endif } DefaultRawMemoryAllocator& DefaultRawMemoryAllocator::GetAllocator() diff --git a/Common/src/FixedBlockMemoryAllocator.cpp b/Common/src/FixedBlockMemoryAllocator.cpp index bca872fa..2d2c993b 100644 --- a/Common/src/FixedBlockMemoryAllocator.cpp +++ b/Common/src/FixedBlockMemoryAllocator.cpp @@ -56,7 +56,7 @@ FixedBlockMemoryAllocator::FixedBlockMemoryAllocator(IMemoryAllocator& RawMemory FixedBlockMemoryAllocator::~FixedBlockMemoryAllocator() { -#ifdef _DEBUG +#ifdef DILIGENT_DEBUG for (size_t p = 0; p < m_PagePool.size(); ++p) { VERIFY(!m_PagePool[p].HasAllocations(), "Memory leak detected: memory page has allocated block"); |
