From 09b9f1dc1ec69683c3143f309e6e8a0141361624 Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 26 Mar 2020 11:40:00 -0700 Subject: Renamed _DEBUG and DEVELOPMENT macros to DILGENT_DEBUG and DILIGENT_DEVELOPMENT --- Common/src/DefaultRawMemoryAllocator.cpp | 8 -------- Common/src/FixedBlockMemoryAllocator.cpp | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'Common/src') 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(Ptr) - 16); -#else delete[] reinterpret_cast(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"); -- cgit v1.2.3