mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-23 03:24:04 +08:00
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.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
||||
2008-01-09 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* score/include/rtems/score/coremutex.h,
|
||||
|
||||
@@ -84,7 +84,7 @@ MALLOC_C_FILES = src/malloc_initialize.c src/calloc.c src/malloc.c \
|
||||
src/mallocinfo.c src/malloc_walk.c src/malloc_get_statistics.c \
|
||||
src/malloc_report_statistics.c src/malloc_report_statistics_plugin.c \
|
||||
src/malloc_statistics_helpers.c src/malloc_boundary.c src/posix_memalign.c \
|
||||
src/malloc_deferred.c src/malloc_sbrk_helpers.c
|
||||
src/malloc_deferred.c src/malloc_sbrk_helpers.c src/malloc_dirtier.c
|
||||
|
||||
PASSWORD_GROUP_C_FILES = src/getpwent.c
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -52,4 +52,4 @@ extern rtems_malloc_statistics_t rtems_malloc_statistics;
|
||||
boolean malloc_is_system_state_OK(void);
|
||||
void malloc_deferred_frees_initialize(void);
|
||||
void malloc_deferred_frees_process(void);
|
||||
void malloc_defer_free(void *);
|
||||
void malloc_deferred_free(void *);
|
||||
|
||||
Reference in New Issue
Block a user