summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/include/rtems/malloc.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-01-09 21:24:30 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-01-09 21:24:30 +0000
commit7fbe6805671c0272311da886b6b4dfc1b537b605 (patch)
tree5f95454209a419d60f6b67156f64b4d14ab01e0c /cpukit/libcsupport/include/rtems/malloc.h
parent2008-01-09 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-7fbe6805671c0272311da886b6b4dfc1b537b605.tar.bz2
2008-01-09 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/Makefile.am: Add src/malloc_dirtier.c. * libcsupport/include/rtems/malloc.h: Add malloc dirty support. * libcsupport/src/malloc_p.h: Correct prototype.
Diffstat (limited to '')
-rw-r--r--cpukit/libcsupport/include/rtems/malloc.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/cpukit/libcsupport/include/rtems/malloc.h b/cpukit/libcsupport/include/rtems/malloc.h
index 6bb152bbf9..e347082819 100644
--- a/cpukit/libcsupport/include/rtems/malloc.h
+++ b/cpukit/libcsupport/include/rtems/malloc.h
@@ -76,6 +76,23 @@ typedef struct {
extern rtems_malloc_sbrk_functions_t rtems_malloc_sbrk_helpers_table;
extern rtems_malloc_sbrk_functions_t *rtems_malloc_sbrk_helpers;
+/*
+ * Malloc Plugin to Dirty Memory at Allocation Time
+ */
+typedef void (*rtems_malloc_dirtier_t)(void *, size_t);
+extern rtems_malloc_dirtier_t *rtems_malloc_dirty_helper;
+
+/** @brief Dirty memory function
+ *
+ * This method fills the specified area with a non-zero pattern
+ * to aid in debugging programs which do not initialize their
+ * memory allocated from the heap.
+ */
+void rtems_malloc_dirty_memory(
+ void *start,
+ size_t size
+);
+
/** @brief Print Malloc Statistic Usage Report
*
* This method fills in the called provided malloc statistics area.