[PATCH] rtems/malloc.h: Add API level Doxygen group

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Aug 10 13:24:00 UTC 2022


The interfaces in the MallocSupport group belong to the implementation.  They
are used by confdefs.h for example.
---
 cpukit/include/rtems/malloc.h | 60 ++++++++++++++++++++++++-----------
 1 file changed, 41 insertions(+), 19 deletions(-)

diff --git a/cpukit/include/rtems/malloc.h b/cpukit/include/rtems/malloc.h
index 7d7f8fa677..c26b262881 100644
--- a/cpukit/include/rtems/malloc.h
+++ b/cpukit/include/rtems/malloc.h
@@ -3,7 +3,12 @@
 /**
  * @file
  *
- * This file defines the interface to RTEMS extensions to the Malloc Family.
+ * @ingroup MallocSupport
+ *
+ * @ingroup RTEMSAPIMalloc
+ *
+ * @brief This header file defines interfaces to support and use dynamic memory
+ *   allocation.
  */
 
 /*
@@ -46,11 +51,13 @@ extern "C" {
 #endif
 
 /**
- *  @defgroup MallocSupport Malloc Support
+ * @defgroup MallocSupport Malloc Support
+ *
+ * @ingroup libcsupport
  *
- *  @ingroup libcsupport
+ * @brief This group contains interfaces to support dynamic memory allocation.
  *
- *  @brief RTEMS extensions to the Malloc Family
+ * @{
  */
 
 /**
@@ -63,8 +70,6 @@ extern Heap_Control *RTEMS_Malloc_Heap;
 
 void _Malloc_Initialize( void );
 
-void rtems_heap_set_sbrk_amount( ptrdiff_t sbrk_amount );
-
 typedef void *(*rtems_heap_extend_handler)(
   Heap_Control *heap,
   size_t alloc_size
@@ -78,19 +83,6 @@ void *rtems_heap_extend_via_sbrk(
   size_t alloc_size
 );
 
-/**
- * @brief Greedy allocate that empties the sbrk memory
- *
- * Afterwards all the sbrk avialable memory will have been allocated
- * to the provided heap.
- *
- * @see rtems_heap_extend_via_sbrk().
- */
-void rtems_heap_sbrk_greedy_allocate(
-  Heap_Control *heap,
-  size_t alloc_size
-);
-
 void *rtems_heap_null_extend(
   Heap_Control *heap,
   size_t alloc_size
@@ -104,6 +96,34 @@ extern const rtems_heap_extend_handler rtems_malloc_extend_handler;
 typedef void (*rtems_malloc_dirtier_t)(void *, size_t);
 extern rtems_malloc_dirtier_t rtems_malloc_dirty_helper;
 
+/** @} */
+
+/**
+ * @defgroup RTEMSAPIMalloc Dynamic Memory Allocation
+ *
+ * @ingroup RTEMSAPI
+ *
+ * @brief This group contains non-standard interfaces to use dynamic memory
+ *   allocation.
+ *
+ * @{
+ */
+
+void rtems_heap_set_sbrk_amount( ptrdiff_t sbrk_amount );
+
+/**
+ * @brief Greedy allocate that empties the sbrk memory
+ *
+ * Afterwards all the sbrk avialable memory will have been allocated
+ * to the provided heap.
+ *
+ * @see rtems_heap_extend_via_sbrk().
+ */
+void rtems_heap_sbrk_greedy_allocate(
+  Heap_Control *heap,
+  size_t alloc_size
+);
+
 /**
  *  @brief Dirty Memory Function
  *
@@ -251,6 +271,8 @@ void *rtems_heap_greedy_allocate_all_except_largest(
  */
 void rtems_heap_greedy_free( void *opaque );
 
+/** @} */
+
 #ifdef __cplusplus
 }
 #endif
-- 
2.35.3



More information about the devel mailing list