mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-25 16:37:42 +01:00
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);
|
||
|
}
|
||
|
|
||
|
|