mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-17 15:18:06 +01:00
86cb372de2
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
26 lines
387 B
C++
26 lines
387 B
C++
#include <Platform/Platform.h>
|
|
|
|
#if 0
|
|
#define DBG(...) DebugLog(2, __VA_ARGS__)
|
|
#else
|
|
#define DBG(...)
|
|
#endif
|
|
|
|
|
|
void* operator new ( unsigned long count )
|
|
{
|
|
void* ptr = AllocatePool(count);
|
|
if ( !ptr ) {
|
|
DebugLog(2, "AllocatePool(%d) returned NULL. Cpu halted\n", count);
|
|
CpuDeadLoop();
|
|
}
|
|
return ptr;
|
|
}
|
|
|
|
void operator delete ( void* ptr ) noexcept
|
|
{
|
|
return FreePool(ptr);
|
|
}
|
|
|
|
|