diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-06-16 17:35:25 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-06-16 17:35:25 +0000 |
commit | 116e83c426f84c7b35e6f0144f7ec2bb5c4434ff (patch) | |
tree | 3c0eae4db8f4c7386b2561ffc0e5221d569b6c16 /cpukit | |
parent | 2010-06-16 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-116e83c426f84c7b35e6f0144f7ec2bb5c4434ff.tar.bz2 |
2010-06-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/src/objectallocate.c: Add conditionally compiled debug code to
printk a message when an object allocation error occurs. This should
be helpful in identifying when a ported package required more
resources.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/ChangeLog | 7 | ||||
-rw-r--r-- | cpukit/score/src/objectallocate.c | 16 |
2 files changed, 23 insertions, 0 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 69e306f94e..bd94a0a115 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,10 @@ +2010-06-16 Joel Sherrill <joel.sherrill@oarcorp.com> + + * score/src/objectallocate.c: Add conditionally compiled debug code to + printk a message when an object allocation error occurs. This should + be helpful in identifying when a ported package required more + resources. + 2010-06-16 Ralf Corsépius <ralf.corsepius@rtems.org> * libfs/src/rfs/rtems-rfs-inode.c: Various 64bit fixes. diff --git a/cpukit/score/src/objectallocate.c b/cpukit/score/src/objectallocate.c index 3a4e329ab6..ac98945a74 100644 --- a/cpukit/score/src/objectallocate.c +++ b/cpukit/score/src/objectallocate.c @@ -28,6 +28,12 @@ #include <rtems/score/sysstate.h> #include <rtems/score/isr.h> +/* #define RTEMS_DEBUG_OBJECT_ALLOCATION */ + +#if defined(RTEMS_DEBUG_OBJECT_ALLOCATION) +#include <rtems/bspIo.h> +#endif + /*PAGE * * _Objects_Allocate @@ -82,5 +88,15 @@ Objects_Control *_Objects_Allocate( } } +#if defined(RTEMS_DEBUG_OBJECT_ALLOCATION) + if ( !the_object ) { + printk( + "OBJECT ALLOCATION FAILURE! API/Class %d/%d\n", + information->the_api, + information->the_class + ); + } +#endif + return the_object; } |