CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
bool CppAD::memory_leak ( size_t  add_static = 0)
inline

Function that checks allocator thread_alloc for misuse that results in memory leaks.

Deprecated routines in track_new_del.hpp and omp_alloc.hpp are also checked.

Parameters
add_static[in] The amount specified by add_static is added to the amount of memory that is expected to be used by thread zero for static variables.
Returns
If add_static is non-zero, the return value is false. Otherwise, if one of the following errors is detected, the return value is true:
  • Thread zero does not have the expected amount of inuse memory (for static variables).
  • A thread, other than thread zero, has any inuse memory.
  • Any thread has available memory.
If an error is detected, diagnostic information is printed to standard output.

Definition at line 150 of file memory_leak.hpp.