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");
|
||
|
}
|