summaryrefslogblamecommitdiff
path: root/src/kernel/lib/cpp.h
blob: cf08ede8429ad1076dc60f5836300a0627f3a109 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                   
#ifndef DEF_CPPSUPPORT_H
#define DEF_CPPSUPPORT_H

#include <mem/mem.h>

inline void* operator new(size_t, void* p)   throw() { return p; }
inline void* operator new[](size_t, void* p) throw() { return p; }
inline void  operator delete  (void*, void*) throw() { };
inline void  operator delete[](void*, void*) throw() { };

inline void* operator new (size_t size) { return kmalloc(size); }
inline void* operator new[] (size_t size) { return kmalloc(size); }
inline void operator delete (void* ptr) { return kfree(ptr); }
inline void operator delete[] (void* ptr) { return kfree(ptr); }

#endif