diff options
| author | azhirnov <zh1dron@gmail.com> | 2020-10-21 22:15:55 +0000 |
|---|---|---|
| committer | azhirnov <zh1dron@gmail.com> | 2020-10-25 10:50:53 +0000 |
| commit | 42217cc1ec7f81c028dcc5c1f845a2fc3b3da497 (patch) | |
| tree | 2efcb7c0fdeae582ecb5c8d13c7bedd593ab9a3c /Common/src | |
| parent | Fixed Mac/iOS build (diff) | |
| parent | Updated Metal testing environment (diff) | |
| download | DiligentCore-42217cc1ec7f81c028dcc5c1f845a2fc3b3da497.tar.gz DiligentCore-42217cc1ec7f81c028dcc5c1f845a2fc3b3da497.zip | |
Merge branch 'master' into ray_tracing
# Conflicts:
# Graphics/GraphicsEngine/interface/PipelineState.h
# Graphics/GraphicsEngineVulkan/include/VulkanTypeConversions.hpp
# Graphics/GraphicsEngineVulkan/src/PipelineLayout.cpp
# Graphics/GraphicsEngineVulkan/src/VulkanTypeConversions.cpp
Diffstat (limited to 'Common/src')
| -rw-r--r-- | Common/src/DefaultRawMemoryAllocator.cpp | 1 | ||||
| -rw-r--r-- | Common/src/FixedBlockMemoryAllocator.cpp | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/Common/src/DefaultRawMemoryAllocator.cpp b/Common/src/DefaultRawMemoryAllocator.cpp index 38840360..f1ecabe8 100644 --- a/Common/src/DefaultRawMemoryAllocator.cpp +++ b/Common/src/DefaultRawMemoryAllocator.cpp @@ -37,6 +37,7 @@ DefaultRawMemoryAllocator::DefaultRawMemoryAllocator() void* DefaultRawMemoryAllocator::Allocate(size_t Size, const Char* dbgDescription, const char* dbgFileName, const Int32 dbgLineNumber) { + VERIFY_EXPR(Size > 0); return new Uint8[Size]; } diff --git a/Common/src/FixedBlockMemoryAllocator.cpp b/Common/src/FixedBlockMemoryAllocator.cpp index 2d2c993b..e4dc53d3 100644 --- a/Common/src/FixedBlockMemoryAllocator.cpp +++ b/Common/src/FixedBlockMemoryAllocator.cpp @@ -74,6 +74,8 @@ void FixedBlockMemoryAllocator::CreateNewPage() void* FixedBlockMemoryAllocator::Allocate(size_t Size, const Char* dbgDescription, const char* dbgFileName, const Int32 dbgLineNumber) { + VERIFY_EXPR(Size > 0); + Size = AdjustBlockSize(Size); VERIFY(m_BlockSize == Size, "Requested size (", Size, ") does not match the block size (", m_BlockSize, ")"); |
