mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-15 23:59:32 +08:00
28 lines
388 B
C++
28 lines
388 B
C++
#include <rtthread.h>
|
|
#include "crt.h"
|
|
|
|
void *operator new(size_t size)
|
|
{
|
|
return rt_malloc(size);
|
|
}
|
|
|
|
void *operator new[](size_t size)
|
|
{
|
|
return rt_malloc(size);
|
|
}
|
|
|
|
void operator delete(void *ptr)
|
|
{
|
|
rt_free(ptr);
|
|
}
|
|
|
|
void operator delete[] (void *ptr)
|
|
{
|
|
return rt_free(ptr);
|
|
}
|
|
|
|
void __cxa_pure_virtual(void)
|
|
{
|
|
rt_kprintf("Illegal to call a pure virtual function.\n");
|
|
}
|