diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-30 00:11:44 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-30 00:11:44 +0000 |
commit | e63b79d590c52f2194c71f6e52f955c848c0c2f5 (patch) | |
tree | f643087a88d889b1169218f6f407062c1a2d90e7 /cpukit/score/src/wkspace.c | |
parent | 2009-07-29 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-e63b79d590c52f2194c71f6e52f955c848c0c2f5.tar.bz2 |
2009-07-29 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/src/wkspace.c: Add debug printks.
Diffstat (limited to 'cpukit/score/src/wkspace.c')
-rw-r--r-- | cpukit/score/src/wkspace.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c index c14b17f560..30dc8d1fe9 100644 --- a/cpukit/score/src/wkspace.c +++ b/cpukit/score/src/wkspace.c @@ -1,7 +1,7 @@ /* * Workspace Handler * - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -23,6 +23,11 @@ #include <string.h> /* for memset */ +/* #define DEBUG_WORKSPACE */ +#if defined(DEBUG_WORKSPACE) + #include <rtems/bspIo.h> +#endif + /* * _Workspace_Handler_initialization */ @@ -67,7 +72,19 @@ void *_Workspace_Allocate( size_t size ) { - return _Heap_Allocate( &_Workspace_Area, size ); + void *p; + + p = _Heap_Allocate( &_Workspace_Area, size ); + #if defined(DEBUG_WORKSPACE) + printk( + "Workspace_Allocate(%d) from %p/%p -> %p\n", + size, + __builtin_return_address( 0 ), + __builtin_return_address( 1 ), + p + ); + #endif + return p; } /* @@ -77,6 +94,14 @@ bool _Workspace_Free( void *block ) { + #if defined(DEBUG_WORKSPACE) + printk( + "Workspace_Free(%p) from %p/%p\n", + block, + __builtin_return_address( 0 ), + __builtin_return_address( 1 ) + ); + #endif return _Heap_Free( &_Workspace_Area, block ); } |