rt-thread-official/components/cplusplus/crt.cpp

28 lines
388 B
C++
Raw Normal View History

2014-11-01 09:09:21 +08:00
#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");
}