blob: 010406c55df25ebf589f2d78ff064c08af6113cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include "UnityPrefix.h"
#include "LowLevelDefaultAllocator.h"
#include "Runtime/Allocator/MemoryManager.h"
#if ENABLE_MEMORY_MANAGER
void* LowLevelAllocator::Malloc (size_t size) { return MemoryManager::LowLevelAllocate(size); }
void* LowLevelAllocator::Realloc (void* ptr, size_t size) { return MemoryManager::LowLevelReallocate(ptr, size); }
void LowLevelAllocator::Free (void* ptr) { MemoryManager::LowLevelFree(ptr); }
#if UNITY_XENON
#include "PlatformDependent/Xbox360/Source/XenonMemory.h"
#if XBOX_USE_DEBUG_MEMORY
// Uses debug memory on compatible devkits
void* LowLevelAllocatorDebugMem::Malloc(size_t size)
{
return DmDebugAlloc(size);
}
void* LowLevelAllocatorDebugMem::Realloc (void* ptr, size_t size)
{
ErrorString("LowLevelAllocatorDebugMem::Realloc is not implemented.");
return 0;
}
void LowLevelAllocatorDebugMem::Free (void* ptr)
{
DmDebugFree(ptr);
}
#endif // XBOX_USE_DEBUG_MEMORY
#endif
#endif
|