CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
static void* CppAD::thread_alloc::get_memory ( size_t  min_bytes,
size_t &  cap_bytes 

Use thread_alloc to get a specified amount of memory.

If the memory allocated by a previous call to get_memory is now avaialable, and min_bytes is between its previous value and the previous cap_bytes, this memory allocation will have optimal speed. Otherwise, the memory allocation is more complicated and may have to wait for other threads to complete an allocation.

min_bytes[in] The minimum number of bytes of memory to be obtained for use.
cap_bytes[out] The actual number of bytes of memory obtained for use.
pointer to the beginning of the memory allocated for use.

Definition at line 767 of file thread_alloc.hpp.

Referenced by CppAD::atomic_base< double >::allocate_work(), create_array(), CppAD::local::pod_vector< Pack >::extend(), CppAD::omp_alloc::get_memory(), parallel_setup(), and CppAD::local::pod_vector< Pack >::resize().