1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
TP-Link_Archer-XR500v/EN7526G_3.18Kernel_SDK/bootrom/bootram/include/new
2024-07-22 01:58:46 -03:00

47 lines
1.2 KiB
C++
Executable File

// The -*- C++ -*- dynamic memory management header.
// Copyright (C) 1994, 1996 Free Software Foundation
#ifndef __NEW__
#define __NEW__
#pragma interface "new"
#include <stddef.h>
#include <exception>
extern "C++" {
#ifdef __HONOR_STD
namespace std {
#endif
class bad_alloc : public exception {
public:
virtual const char* what() const throw() { return "bad_alloc"; }
};
struct nothrow_t {};
extern const nothrow_t nothrow;
typedef void (*new_handler)();
new_handler set_new_handler (new_handler);
#ifdef __HONOR_STD
} // namespace std
#endif
// replaceable signatures
void *operator new (size_t) throw (std::bad_alloc);
void *operator new[] (size_t) throw (std::bad_alloc);
void operator delete (void *) throw();
void operator delete[] (void *) throw();
void *operator new (size_t, const std::nothrow_t&) throw();
void *operator new[] (size_t, const std::nothrow_t&) throw();
void operator delete (void *, const std::nothrow_t&) throw();
void operator delete[] (void *, const std::nothrow_t&) throw();
// default placement versions of operator new
inline void *operator new(size_t, void *place) throw() { return place; }
inline void *operator new[](size_t, void *place) throw() { return place; }
} // extern "C++"
#endif