aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEugene Uriev <eugeneuriev@gmail.com>2024-03-31 23:03:24 +0300
committerTom Rini <trini@konsulko.com>2024-04-12 16:23:06 -0600
commit18c1bfafe0ccdd3229d91bbb07ed942e9f233f93 (patch)
tree2c626c8976822e5abd997091fb97a541ea176745 /include
parentae838768d79cbb834c4a8a5f4810df373e58b622 (diff)
downloadu-boot-18c1bfafe0ccdd3229d91bbb07ed942e9f233f93.zip
u-boot-18c1bfafe0ccdd3229d91bbb07ed942e9f233f93.tar.gz
u-boot-18c1bfafe0ccdd3229d91bbb07ed942e9f233f93.tar.bz2
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')
-rw-r--r--include/mcheck.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/mcheck.h b/include/mcheck.h
index a049745..f4c9b7e 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.
*/