Prev Next ta_hold_memory

@(@\newcommand{\W}[1]{ \; #1 \; } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\B}[1]{ {\bf #1} } \newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} } \newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} } \newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} } \newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }@)@
Control When Thread Alloc Retains Memory For Future Use

Syntax
thread_alloc::hold_memory(value)

Purpose
It should be faster, even when num_thread is equal to one, for thread_alloc to hold onto memory. Calling hold_memory with value equal to true, instructs thread_alloc to hold onto memory, and put it in the available pool, after each call to return_memory .

value
If value is true, thread_alloc with hold onto memory for future quick use. If it is false, future calls to return_memory will return the corresponding memory to the system. By default (when hold_memory has not been called) thread_alloc does not hold onto memory.

free_available
Memory that is being held by thread_alloc can be returned to the system using free_available .
Input File: cppad/utility/thread_alloc.hpp