new File Reference

#include <cstddef>
#include <exception>

Include dependency graph for new:

This graph shows which files directly or indirectly include this file:

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.


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]
 

These are replaceable signatures:

  • normal single new and delete (no arguments, throw bad_alloc on error)
  • normal array new and delete (same)
  • nothrow single new and delete (take a nothrow argument, return NULL on error)
  • nothrow array new and delete (same)

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

Definition at line 96 of file new.

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

These are replaceable signatures:

  • normal single new and delete (no arguments, throw bad_alloc on error)
  • normal array new and delete (same)
  • nothrow single new and delete (take a nothrow argument, return NULL on error)
  • nothrow array new and delete (same)

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

void operator delete void *   )  throw ()
 

These are replaceable signatures:

  • normal single new and delete (no arguments, throw bad_alloc on error)
  • normal array new and delete (same)
  • nothrow single new and delete (take a nothrow argument, return NULL on error)
  • nothrow array new and delete (same)

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_release_memory().

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

These are replaceable signatures:

  • normal single new and delete (no arguments, throw bad_alloc on error)
  • normal array new and delete (same)
  • nothrow single new and delete (take a nothrow argument, return NULL on error)
  • nothrow array new and delete (same)

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

Definition at line 97 of file new.

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

These are replaceable signatures:

  • normal single new and delete (no arguments, throw bad_alloc on error)
  • normal array new and delete (same)
  • nothrow single new and delete (take a nothrow argument, return NULL on error)
  • nothrow array new and delete (same)

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

void operator delete[] void *   )  throw ()
 

These are replaceable signatures:

  • normal single new and delete (no arguments, throw bad_alloc on error)
  • normal array new and delete (same)
  • nothrow single new and delete (take a nothrow argument, return NULL on error)
  • nothrow array new and delete (same)

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

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

These are replaceable signatures:

  • normal single new and delete (no arguments, throw bad_alloc on error)
  • normal array new and delete (same)
  • nothrow single new and delete (take a nothrow argument, return NULL on error)
  • nothrow array new and delete (same)

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

Definition at line 92 of file new.

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

These are replaceable signatures:

  • normal single new and delete (no arguments, throw bad_alloc on error)
  • normal array new and delete (same)
  • nothrow single new and delete (take a nothrow argument, return NULL on error)
  • nothrow array new and delete (same)

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

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

These are replaceable signatures:

  • normal single new and delete (no arguments, throw bad_alloc on error)
  • normal array new and delete (same)
  • nothrow single new and delete (take a nothrow argument, return NULL on error)
  • nothrow array new and delete (same)

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(), and std::new_alloc::allocate().

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

These are replaceable signatures:

  • normal single new and delete (no arguments, throw bad_alloc on error)
  • normal array new and delete (same)
  • nothrow single new and delete (take a nothrow argument, return NULL on error)
  • nothrow array new and delete (same)

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

Definition at line 93 of file new.

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

These are replaceable signatures:

  • normal single new and delete (no arguments, throw bad_alloc on error)
  • normal array new and delete (same)
  • nothrow single new and delete (take a nothrow argument, return NULL on error)
  • nothrow array new and delete (same)

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

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

These are replaceable signatures:

  • normal single new and delete (no arguments, throw bad_alloc on error)
  • normal array new and delete (same)
  • nothrow single new and delete (take a nothrow argument, return NULL on error)
  • nothrow array new and delete (same)

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


Generated on Fri Sep 16 09:22:12 2005 for libstdc++-v3 Source by  doxygen 1.4.4