1 // Implementation file for the -*- C++ -*- dynamic memory management header.
3 // Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 // 2005, 2006, 2007, 2009
5 // Free Software Foundation
7 // This file is part of GCC.
9 // GCC is free software; you can redistribute it and/or modify
10 // it under the terms of the GNU General Public License as published by
11 // the Free Software Foundation; either version 3, or (at your option)
14 // GCC is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
19 // Under Section 7 of GPL version 3, you are granted additional
20 // permissions described in the GCC Runtime Library Exception, version
21 // 3.1, as published by the Free Software Foundation.
23 // You should have received a copy of the GNU General Public License and
24 // a copy of the GCC Runtime Library Exception along with this program;
25 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
26 // <http://www.gnu.org/licenses/>.
30 const std::nothrow_t
std::nothrow
= { };
32 using std::new_handler
;
33 new_handler __new_handler
;
36 std::set_new_handler (new_handler handler
) throw()
38 new_handler prev_handler
= __new_handler
;
39 __new_handler
= handler
;
43 std::bad_alloc::~bad_alloc() throw() { }
46 std::bad_alloc::what() const throw()
48 return "std::bad_alloc";