new File Reference

#include <cstddef>
#include <exception>

Go to the source code of this file.

Namespaces

namespace  std

Classes

class  std::bad_alloc
 Exception possibly thrown by new. More...
struct  std::nothrow_t
void * operator new (std::size_t) throw (std::bad_alloc)
void * operator new[] (std::size_t) throw (std::bad_alloc)
void operator delete (void *) throw ()
void operator delete[] (void *) throw ()
void * operator new (std::size_t, const std::nothrow_t &) throw ()
void * operator new[] (std::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 ()
void * operator new (std::size_t, void *__p) throw ()
void * operator new[] (std::size_t, void *__p) throw ()
void operator delete (void *, void *) throw ()
void operator delete[] (void *, void *) throw ()

Typedefs

typedef void(*) std::new_handler ()

Functions

new_handler std::set_new_handler (new_handler) throw ()
 Takes a replacement handler as the argument, returns the previous handler.

Variables

const nothrow_t std::nothrow


Detailed Description

The header new defines several functions to manage dynamic memory and handling memory allocation errors; see http://gcc.gnu.org/onlinedocs/libstdc++/18_support/howto.html#4 for more.

Definition in file new.


Function Documentation

void operator delete ( void *  ,
void *   
) throw () [inline]

Definition at line 98 of file new.

void operator delete ( void *  ,
const std::nothrow_t  
) throw ()

void operator delete ( void *   )  throw ()

Referenced by std::__valarray_release_memory(), and __gnu_cxx::bitmap_allocator< _Tp >::deallocate().

void operator delete[] ( void *  ,
void *   
) throw () [inline]

Definition at line 99 of file new.

void operator delete[] ( void *  ,
const std::nothrow_t  
) throw ()

void operator delete[] ( void *   )  throw ()

void* operator new ( std::size_t  ,
void *  __p 
) throw () [inline]

Definition at line 94 of file new.

void* operator new ( std::size_t  ,
const std::nothrow_t  
) throw ()

void* operator new ( std::size_t   )  throw (std::bad_alloc)

These are replaceable signatures:

Placement new and delete signatures (take a memory address argument, does nothing) may not be replaced by a user's program.

Referenced by std::__valarray_get_memory().

void* operator new[] ( std::size_t  ,
void *  __p 
) throw () [inline]

Definition at line 95 of file new.

void* operator new[] ( std::size_t  ,
const std::nothrow_t  
) throw ()

void* operator new[] ( std::size_t   )  throw (std::bad_alloc)


Generated on Tue Feb 2 16:57:23 2010 for GNU C++ STL by  doxygen 1.4.7