diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-09 21:08:36 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-09 21:08:36 +0000 |
commit | 635865aefd842e94e32856b8d32fbcacb52d78ba (patch) | |
tree | 0f72fdb1b2a42b01744451e124b46bac24705281 /cpukit/libcsupport/src/malloc.c | |
parent | 2008-01-09 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-635865aefd842e94e32856b8d32fbcacb52d78ba.tar.bz2 |
2008-01-09 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/Makefile.am, libcsupport/include/rtems/malloc.h,
libcsupport/src/free.c, libcsupport/src/malloc.c,
libcsupport/src/malloc_deferred.c,
libcsupport/src/malloc_initialize.c, libcsupport/src/malloc_p.h,
libcsupport/src/malloc_sbrk_helpers.c,
libcsupport/src/posix_memalign.c: Place all deferred free code and
place it in subroutines. Add plugin for dirtying allocated memory to
assist in debugging. Clean up comments and spacing as needed.
* libcsupport/src/malloc_dirtier.c: New file.
Diffstat (limited to 'cpukit/libcsupport/src/malloc.c')
-rw-r--r-- | cpukit/libcsupport/src/malloc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cpukit/libcsupport/src/malloc.c b/cpukit/libcsupport/src/malloc.c index 954d5f7690..60a8793f8d 100644 --- a/cpukit/libcsupport/src/malloc.c +++ b/cpukit/libcsupport/src/malloc.c @@ -27,14 +27,13 @@ void *malloc( ) { void *return_this; - Chain_Node *to_be_freed; MSBUMP(malloc_calls, 1); /* * If some free's have been deferred, then do them now. */ - malloc_process_deferred_frees(); + malloc_deferred_frees_process(); /* * Validate the parameters @@ -85,9 +84,8 @@ void *malloc( /* * If the user wants us to dirty the allocated memory, then do it. */ - #ifdef MALLOC_DIRTY - (void) memset(return_this, 0xCF, size); - #endif + if ( rtems_malloc_dirty_helper ) + (*rtems_malloc_dirty_helper)( return_this, size ); /* * If configured, update the statistics |