mirror of
https://github.com/reactos/reactos.git
synced 2024-11-06 06:33:08 +00:00
527f2f9057
* Create a branch for some evul shell experiments. svn path=/branches/shell-experiments/; revision=61927
47 lines
1.3 KiB
Text
47 lines
1.3 KiB
Text
// Standard C++ dynamic memory management header
|
|
|
|
#ifndef _NEW
|
|
#define _NEW
|
|
|
|
#include <cstddef>
|
|
#include <exception>
|
|
|
|
extern "C++" {
|
|
|
|
class bad_alloc : public exception
|
|
{
|
|
public:
|
|
bad_alloc(const char *name = "bad alloc") throw()
|
|
: exception(name) { }
|
|
|
|
virtual ~bad_alloc() throw() { }
|
|
};
|
|
|
|
namespace std
|
|
{
|
|
using ::bad_alloc;
|
|
|
|
struct nothrow_t { };
|
|
|
|
extern const nothrow_t nothrow;
|
|
} // namespace std
|
|
|
|
typedef void (*new_handler)();
|
|
|
|
new_handler set_new_handler(new_handler) throw();
|
|
|
|
void* operator new (std::size_t size, const std::nothrow_t& nothrow_constant) throw();
|
|
inline void* operator new (std::size_t size, void* ptr) throw() { return ptr; }
|
|
void* operator new[] (std::size_t size, const std::nothrow_t& nothrow_constant) throw();
|
|
inline void* operator new[] (std::size_t size, void* ptr) throw() { return ptr; }
|
|
|
|
void operator delete (void* ptr) throw ();
|
|
void operator delete (void* ptr, const std::nothrow_t& nothrow_constant) throw();
|
|
inline void operator delete (void* ptr, void* voidptr2) throw() { }
|
|
void operator delete[] (void* ptr) throw ();
|
|
void operator delete[] (void* ptr, const std::nothrow_t& nothrow_constant) throw();
|
|
inline void operator delete[] (void* ptr, void* voidptr2) throw() { }
|
|
|
|
} // extern "C++"
|
|
|
|
#endif
|