summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/mallocfreespace.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2004-11-29 22:45:43 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2004-11-29 22:45:43 +0000
commit9b3f187a02049d81a63bb85497c5a4ebb9d37a97 (patch)
tree7796f90657fdd839f998a88f2cc4d0688ffb29c9 /cpukit/libcsupport/src/mallocfreespace.c
parentAdd another module ID code. (diff)
downloadrtems-9b3f187a02049d81a63bb85497c5a4ebb9d37a97.tar.bz2
2004-11-29 Joel Sherrill <joel@OARcorp.com>
* libcsupport/src/mallocfreespace.c, rtems/Makefile.am, rtems/include/rtems/rtems/region.h, score/Makefile.am, score/include/rtems/score/heap.h, score/src/heapgetinfo.c: Add capability to return information about just the free blocks in a region or heap. Also changed the semantics of free space available to be the largest block of memory that can be allocated. * rtems/src/regiongetfreeinfo.c, score/src/heapgetfreeinfo.c: New files. : score/include/rtems/score/object.h, score/src/objectinitializeinformation.c: Remove warning.
Diffstat (limited to 'cpukit/libcsupport/src/mallocfreespace.c')
-rw-r--r--cpukit/libcsupport/src/mallocfreespace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/libcsupport/src/mallocfreespace.c b/cpukit/libcsupport/src/mallocfreespace.c
index bbf4a78e16..448dca46e4 100644
--- a/cpukit/libcsupport/src/mallocfreespace.c
+++ b/cpukit/libcsupport/src/mallocfreespace.c
@@ -37,8 +37,8 @@ size_t malloc_free_space( void )
{
region_information_block heap_info;
- if ( !rtems_region_get_information( RTEMS_Malloc_Heap, &heap_info ) ) {
- return (size_t) heap_info.free_size;
+ if ( !rtems_region_get_free_information( RTEMS_Malloc_Heap, &heap_info ) ) {
+ return (size_t) heap_info.Free.largest;
}
return (size_t) -1;
}