Luna/kernel/src/misc/new.cpp

32 lines
387 B
C++

#include "std/stdlib.h"
#include <stddef.h>
void* operator new(size_t size)
{
return kmalloc(size);
}
void* operator new[](size_t size)
{
return kmalloc(size);
}
void operator delete(void* p)
{
kfree(p);
}
void operator delete[](void* p)
{
kfree(p);
}
void operator delete(void* p, size_t)
{
kfree(p);
}
void operator delete[](void* p, size_t)
{
kfree(p);
}