Move new / delete kernel_cpp.h -> kernel_cpp.cpp

new and delete may not be defined as inline, as Clang loudly complains.
The same is true for static.
This commit is contained in:
Jonathan Schleifer
2015-11-07 18:16:23 +01:00
parent b310316956
commit 71e0324992
2 changed files with 57 additions and 59 deletions
-59
View File
@@ -22,65 +22,6 @@ extern const nothrow_t std::nothrow;
typedef struct {} mynothrow_t;
extern const mynothrow_t mynothrow;
inline void *
operator new(size_t size) throw (std::bad_alloc)
{
// we don't actually throw any exceptions, but we have to
// keep the prototype as specified in <new>, or else GCC 3
// won't like us
return malloc(size);
}
inline void *
operator new[](size_t size) throw (std::bad_alloc)
{
return malloc(size);
}
inline void *
operator new(size_t size, const std::nothrow_t &) throw ()
{
return malloc(size);
}
inline void *
operator new[](size_t size, const std::nothrow_t &) throw ()
{
return malloc(size);
}
inline void *
operator new(size_t size, const mynothrow_t &) throw ()
{
return malloc(size);
}
inline void *
operator new[](size_t size, const mynothrow_t &) throw ()
{
return malloc(size);
}
inline void
operator delete(void *ptr) throw ()
{
free(ptr);
}
inline void
operator delete[](void *ptr) throw ()
{
free(ptr);
}
#endif // #if _KERNEL_MODE
#endif // __cplusplus