diff options
Diffstat (limited to 'src/libstrongswan/utils/leak_detective.h')
-rw-r--r-- | src/libstrongswan/utils/leak_detective.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libstrongswan/utils/leak_detective.h b/src/libstrongswan/utils/leak_detective.h index 3fd0b8c93..ca70067d4 100644 --- a/src/libstrongswan/utils/leak_detective.h +++ b/src/libstrongswan/utils/leak_detective.h @@ -50,9 +50,7 @@ typedef void (*leak_detective_summary_cb_t)(void* user, int count, size_t bytes, int whitelisted); /** - * Leak detective finds leaks and bad frees using malloc hooks. - * - * Currently leaks are reported to stderr on destruction. + * Leak detective finds leaks and invalid frees using malloc hooks. * * @todo Build an API for leak detective, allowing leak enumeration, statistics * and dynamic whitelisting. @@ -62,13 +60,12 @@ struct leak_detective_t { /** * Report leaks to the registered callback functions. * - * @param detailed TRUE to resolve line/filename of leak (slow) + * @param detailed TRUE to resolve line/filename of leaks (slow) */ void (*report)(leak_detective_t *this, bool detailed); /** - * Report current memory usage to out. - * Set callback functions invoked during a report(). + * Set callback functions invoked when report() is called. * * @param cb callback invoked for each detected leak * @param scb summary callback invoked at end of report @@ -78,11 +75,11 @@ struct leak_detective_t { leak_detective_summary_cb_t scb, void *user); /** - * Report current memory usage using a callbacks. + * Report current memory usage using callback functions. * * @param cb callback invoked for each allocation * @param scb summary callback invoked at end of usage report - * @param user user data supplied to callbacks + * @param user user data to supply to callbacks */ void (*usage)(leak_detective_t *this, leak_detective_report_cb_t cb, leak_detective_summary_cb_t scb, void *user); @@ -109,7 +106,10 @@ struct leak_detective_t { }; /** - * Create a leak_detective instance. + * Create a leak_detective instance, unless the LEAK_DETECTIVE_DISABLE + * environment variable is set. + * + * @return leak detective instance */ leak_detective_t *leak_detective_create(); |