memory File Reference


Detailed Description

This is a Standard C++ Library header.

Definition in file memory.

Go to the source code of this file.

Namespaces

Defines

Functions


Function Documentation

pair<_Tp*, ptrdiff_t> get_temporary_buffer ptrdiff_t  __len  )  [inline]
 

Allocates a temporary buffer.

Parameters:
len The number of objects of type Tp.
Returns:
See full description.
Reinventing the wheel, but this time with prettier spokes!

This function tries to obtain storage for len adjacent Tp objects. The objects themselves are not constructed, of course. A pair<> is returned containing "the buffer s address and capacity (in the units of sizeof(Tp)), or a pair of 0 values if no storage can be obtained." Note that the capacity obtained may be less than that requested if the memory is unavailable; you should compare len with the .second return value.

Provides the nothrow exception guarantee.

Definition at line 110 of file memory.

void return_temporary_buffer _Tp *  __p  ) 
 

The companion to get_temporary_buffer().

Parameters:
p A buffer previously allocated by get_temporary_buffer.
Returns:
None.
Frees the memory pointed to by p.

Definition at line 122 of file memory.


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