diff options
author | Eugene Uriev | 2024-03-31 23:03:24 +0300 |
---|---|---|
committer | Tom Rini | 2024-04-12 16:23:06 -0600 |
commit | 18c1bfafe0ccdd3229d91bbb07ed942e9f233f93 (patch) | |
tree | 2c626c8976822e5abd997091fb97a541ea176745 /include/mcheck.h | |
parent | ae838768d79cbb834c4a8a5f4810df373e58b622 (diff) |
mcheck: add pedantic mode support
The pedantic mode is run-time contolled, so
appropriate registry take place everytime.
Maybe it's worth to use compile-time control only.
So, the registry could be optimized out by an #ifdef.
Signed-off-by: Eugene Uriev <eugeneuriev@gmail.com>
Diffstat (limited to 'include/mcheck.h')
-rw-r--r-- | include/mcheck.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/mcheck.h b/include/mcheck.h index a049745e4e3..f4c9b7e61c8 100644 --- a/include/mcheck.h +++ b/include/mcheck.h @@ -34,6 +34,15 @@ typedef void (*mcheck_abortfunc_t)(enum mcheck_status); int mcheck(mcheck_abortfunc_t func); /* + * Similar to `mcheck' but performs checks for all block whenever one of + * the memory handling functions is called. This can be very slow. + */ +int mcheck_pedantic(mcheck_abortfunc_t f); + +/* Force check of all blocks now. */ +void mcheck_check_all(void); + +/* * Check for aberrations in a particular malloc'd block. These are the * same checks that `mcheck' does, when you free or reallocate a block. */ |