summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/rtems_heap_greedy.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libcsupport/src/rtems_heap_greedy.c')
-rw-r--r--cpukit/libcsupport/src/rtems_heap_greedy.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/cpukit/libcsupport/src/rtems_heap_greedy.c b/cpukit/libcsupport/src/rtems_heap_greedy.c
index a63ff913cd..19ab28b047 100644
--- a/cpukit/libcsupport/src/rtems_heap_greedy.c
+++ b/cpukit/libcsupport/src/rtems_heap_greedy.c
@@ -39,6 +39,22 @@ void *rtems_heap_greedy_allocate(
return opaque;
}
+void *rtems_heap_greedy_allocate_all_except_largest(
+ uintptr_t *allocatable_size
+)
+{
+ void *opaque;
+
+ _RTEMS_Lock_allocator();
+ opaque = _Heap_Greedy_allocate_all_except_largest(
+ RTEMS_Malloc_Heap,
+ allocatable_size
+ );
+ _RTEMS_Unlock_allocator();
+
+ return opaque;
+}
+
void rtems_heap_greedy_free( void *opaque )
{
_RTEMS_Lock_allocator();