197403Sobrien// Implementation file for the -*- C++ -*- dynamic memory management header. 297403Sobrien 3169691Skan// Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4169691Skan// 2005, 2006, 2007 597403Sobrien// Free Software Foundation 697403Sobrien// 7132720Skan// This file is part of GCC. 897403Sobrien// 9132720Skan// GCC is free software; you can redistribute it and/or modify 1097403Sobrien// it under the terms of the GNU General Public License as published by 1197403Sobrien// the Free Software Foundation; either version 2, or (at your option) 1297403Sobrien// any later version. 1397403Sobrien// 14132720Skan// GCC is distributed in the hope that it will be useful, 1597403Sobrien// but WITHOUT ANY WARRANTY; without even the implied warranty of 1697403Sobrien// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1797403Sobrien// GNU General Public License for more details. 1897403Sobrien// 1997403Sobrien// You should have received a copy of the GNU General Public License 20132720Skan// along with GCC; see the file COPYING. If not, write to 21169691Skan// the Free Software Foundation, 51 Franklin Street, Fifth Floor, 22169691Skan// Boston, MA 02110-1301, USA. 2397403Sobrien// 2497403Sobrien// As a special exception, you may use this file as part of a free software 2597403Sobrien// library without restriction. Specifically, if other files instantiate 2697403Sobrien// templates or use macros or inline functions from this file, or you compile 2797403Sobrien// this file and link it with other files to produce an executable, this 2897403Sobrien// file does not by itself cause the resulting executable to be covered by 2997403Sobrien// the GNU General Public License. This exception does not however 3097403Sobrien// invalidate any other reasons why the executable file might be covered by 3197403Sobrien// the GNU General Public License. 3297403Sobrien 3397403Sobrien#include "new" 3497403Sobrien 3597403Sobrienconst std::nothrow_t std::nothrow = { }; 3697403Sobrien 3797403Sobrienusing std::new_handler; 3897403Sobriennew_handler __new_handler; 3997403Sobrien 4097403Sobriennew_handler 41102782Skanstd::set_new_handler (new_handler handler) throw() 4297403Sobrien{ 4397403Sobrien new_handler prev_handler = __new_handler; 4497403Sobrien __new_handler = handler; 4597403Sobrien return prev_handler; 4697403Sobrien} 4797403Sobrien 4897403Sobrienstd::bad_alloc::~bad_alloc() throw() { } 49169691Skan 50169691Skanconst char* 51169691Skanstd::bad_alloc::what() const throw() 52169691Skan{ 53169691Skan return "std::bad_alloc"; 54169691Skan} 55