lines 259-305 of file: include/cppad/utility/omp_alloc.hpp

{xrst_begin omp_return_memory app}

Return Memory to omp_alloc
##########################

Deprecated 2011-08-31
*********************
Use the function :ref:`thread_alloc::return_memory<ta_return_memory-name>` instead.

Syntax
******

   # ``include <cppad/utility/omp_alloc.hpp>``

``omp_alloc::return_memory`` ( *v_ptr* )

Purpose
*******
If :ref:`omp_max_num_threads-name` is one,
the memory is returned to the system.
Otherwise, the memory is retained by :ref:`omp_alloc-name` for quick future use
by the thread that allocated to memory.

v_ptr
*****
This argument has prototype

   ``void`` * *v_ptr*

.
It must be a pointer to memory that is currently in use; i.e.
obtained by a previous call to :ref:`omp_get_memory-name` and not yet returned.

Thread
******
Either the :ref:`current thread<omp_get_thread_num-name>` must be the same as during
the corresponding call to :ref:`omp_get_memory-name` ,
or the current execution mode must be sequential
(not :ref:`parallel<omp_in_parallel-name>` ).

NDEBUG
******
If ``NDEBUG`` is defined, *v_ptr* is not checked (this is faster).
Otherwise, a list of in use pointers is searched to make sure
that *v_ptr* is in the list.

{xrst_end omp_return_memory}
