new File Reference


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.

Go to the source code of this file.

Namespaces

Typedefs

Functions

Variables


Typedef Documentation

typedef void(* new_handler)()
 

If you write your own error handler to be called by new, it must be of this type.

Definition at line 68 of file new.


Function Documentation

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.

new_handler set_new_handler new_handler   )  throw ()
 

Takes a replacement handler as the argument, returns the previous handler.


Generated on Sat Apr 2 13:54:44 2005 for libstdc++ source by  doxygen 1.4.0