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: include/cppad/utility/thread_alloc.hpp