From 9b3f187a02049d81a63bb85497c5a4ebb9d37a97 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 29 Nov 2004 22:45:43 +0000 Subject: 2004-11-29 Joel Sherrill * 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. --- cpukit/libcsupport/src/mallocfreespace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpukit/libcsupport/src/mallocfreespace.c') 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; } -- cgit v1.2.3