Index: cpukit/libcsupport/include/rtems/malloc.h
===================================================================
--- cpukit/libcsupport/include/rtems/malloc.h	(revision c497657ffbe17bb38f660652b1d809dee2d775f3)
+++ cpukit/libcsupport/include/rtems/malloc.h	(revision d0d357edeb8527becced15e2784b92790d2b22c1)
@@ -225,5 +225,5 @@
  * @brief Greedy allocate that empties the heap.
  *
- * Afterward the heap has at most @a block_count allocatable blocks of sizes
+ * Afterwards the heap has at most @a block_count allocatable blocks of sizes
  * specified by @a block_sizes.  The @a block_sizes must point to an array with
  * @a block_count members.  All other blocks are used.
@@ -237,8 +237,22 @@
 
 /**
+ * @brief Greedy allocate all blocks except the largest free block.
+ *
+ * Afterwards the heap has at most one allocatable block.  This block is the
+ * largest free block if it exists.  The allocatable size of this block is
+ * stored in @a allocatable_size.  All other blocks are used.
+ *
+ * @see rtems_heap_greedy_free().
+ */
+void *rtems_heap_greedy_allocate_all_except_largest(
+  uintptr_t *allocatable_size
+);
+
+/**
  * @brief Frees space of a greedy allocation.
  *
  * The @a opaque argument must be the return value of
- * rtems_heap_greedy_allocate().
+ * rtems_heap_greedy_allocate() or
+ * rtems_heap_greedy_allocate_all_except_largest().
  */
 void rtems_heap_greedy_free( void *opaque );
Index: cpukit/libcsupport/src/rtems_heap_greedy.c
===================================================================
--- cpukit/libcsupport/src/rtems_heap_greedy.c	(revision c497657ffbe17bb38f660652b1d809dee2d775f3)
+++ cpukit/libcsupport/src/rtems_heap_greedy.c	(revision d0d357edeb8527becced15e2784b92790d2b22c1)
@@ -40,4 +40,20 @@
 }
 
+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 )
 {
Index: cpukit/rtems/include/rtems/rtems/support.h
===================================================================
--- cpukit/rtems/include/rtems/rtems/support.h	(revision c497657ffbe17bb38f660652b1d809dee2d775f3)
+++ cpukit/rtems/include/rtems/rtems/support.h	(revision d0d357edeb8527becced15e2784b92790d2b22c1)
@@ -100,5 +100,5 @@
  * @brief Greedy allocate that empties the workspace.
  *
- * Afterward the heap has at most @a block_count allocateable blocks of sizes
+ * Afterwards the heap has at most @a block_count allocatable blocks of sizes
  * specified by @a block_sizes.  The @a block_sizes must point to an array with
  * @a block_count members.  All other blocks are used.
@@ -112,8 +112,22 @@
 
 /**
+ * @brief Greedy allocate all blocks except the largest free block.
+ *
+ * Afterwards the heap has at most one allocatable block.  This block is the
+ * largest free block if it exists.  The allocatable size of this block is
+ * stored in @a allocatable_size.  All other blocks are used.
+ *
+ * @see rtems_workspace_greedy_free().
+ */
+void *rtems_workspace_greedy_allocate_all_except_largest(
+  uintptr_t *allocatable_size
+);
+
+/**
  * @brief Frees space of a greedy allocation.
  *
  * The @a opaque argument must be the return value of
- * rtems_workspace_greedy_allocate().
+ * rtems_workspace_greedy_allocate() or
+ * rtems_workspace_greedy_allocate_all_except_largest().
  */
 void rtems_workspace_greedy_free( void *opaque );
Index: cpukit/rtems/src/workspacegreedy.c
===================================================================
--- cpukit/rtems/src/workspacegreedy.c	(revision c497657ffbe17bb38f660652b1d809dee2d775f3)
+++ cpukit/rtems/src/workspacegreedy.c	(revision d0d357edeb8527becced15e2784b92790d2b22c1)
@@ -41,4 +41,20 @@
 }
 
+void *rtems_workspace_greedy_allocate_all_except_largest(
+  uintptr_t *allocatable_size
+)
+{
+  void *opaque;
+
+  _Thread_Disable_dispatch();
+  opaque = _Heap_Greedy_allocate_all_except_largest(
+    &_Workspace_Area,
+    allocatable_size
+  );
+  _Thread_Enable_dispatch();
+
+  return opaque;
+}
+
 void rtems_workspace_greedy_free( void *opaque )
 {
Index: cpukit/score/include/rtems/score/heap.h
===================================================================
--- cpukit/score/include/rtems/score/heap.h	(revision c497657ffbe17bb38f660652b1d809dee2d775f3)
+++ cpukit/score/include/rtems/score/heap.h	(revision d0d357edeb8527becced15e2784b92790d2b22c1)
@@ -596,5 +596,5 @@
  * @brief Greedy allocate that empties the heap.
  *
- * Afterward the heap has at most @a block_count allocateable blocks of sizes
+ * Afterwards the heap has at most @a block_count allocatable blocks of sizes
  * specified by @a block_sizes.  The @a block_sizes must point to an array with
  * @a block_count members.  All other blocks are used.
@@ -606,4 +606,18 @@
   const uintptr_t *block_sizes,
   size_t block_count
+);
+
+/**
+ * @brief Greedy allocate all blocks except the largest free block.
+ *
+ * Afterwards the heap has at most one allocatable block.  This block is the
+ * largest free block if it exists.  The allocatable size of this block is
+ * stored in @a allocatable_size.  All other blocks are used.
+ *
+ * @see _Heap_Greedy_free().
+ */
+Heap_Block *_Heap_Greedy_allocate_all_except_largest(
+  Heap_Control *heap,
+  uintptr_t *allocatable_size
 );
 
Index: cpukit/score/src/heapgreedy.c
===================================================================
--- cpukit/score/src/heapgreedy.c	(revision c497657ffbe17bb38f660652b1d809dee2d775f3)
+++ cpukit/score/src/heapgreedy.c	(revision d0d357edeb8527becced15e2784b92790d2b22c1)
@@ -76,4 +76,17 @@
 }
 
+Heap_Block *_Heap_Greedy_allocate_all_except_largest(
+  Heap_Control *heap,
+  uintptr_t *allocatable_size
+)
+{
+  Heap_Information info;
+
+  _Heap_Get_free_information( heap, &info );
+  *allocatable_size = info.largest - HEAP_BLOCK_HEADER_SIZE + HEAP_ALLOC_BONUS;
+
+  return _Heap_Greedy_allocate( heap, allocatable_size, 1 );
+}
+
 void _Heap_Greedy_free(
   Heap_Control *heap,
