From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/Allocator/BaseAllocator.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Runtime/Allocator/BaseAllocator.cpp (limited to 'Runtime/Allocator/BaseAllocator.cpp') diff --git a/Runtime/Allocator/BaseAllocator.cpp b/Runtime/Allocator/BaseAllocator.cpp new file mode 100644 index 0000000..6ce5d0e --- /dev/null +++ b/Runtime/Allocator/BaseAllocator.cpp @@ -0,0 +1,21 @@ +#include "UnityPrefix.h" +#include "BaseAllocator.h" + +void* BaseAllocator::Reallocate( void* p, size_t size, int align ) +{ +// ErrorString("Not implemented"); + return 0; +} + +static UInt32 g_IncrementIdentifier = 0x10; +BaseAllocator::BaseAllocator(const char* name) +: m_TotalRequestedBytes(0) +, m_TotalReservedMemory(0) +, m_BookKeepingMemoryUsage(0) +, m_PeakRequestedBytes(0) +, m_NumAllocations(0) +, m_Name(name) +{ + m_AllocatorIdentifier = g_IncrementIdentifier++; +} + -- cgit v1.1-26-g67d0