doc: Added group definitions for most common modules.
[bertos.git] / bertos / struct / heap.h
index ad362a6b1966867a04a16b25854bf3b6bdc195e6..9846079af7a734e73a40752d1353c43ce4779789 100644 (file)
  * Copyright 1999, 2000, 2001, 2008 Bernie Innocenti <bernie@codewiz.org>
  * -->
  *
+ * \defgroup heap Embedded optimized memory allocator
+ * \ingroup core
+ * \{
+ *
  * \brief Heap subsystem (public interface).
  *
  * \todo Heap memory could be defined as an array of MemChunk, and used
  * in this form also within the implementation. This would probably remove
  * memory alignment problems, and also some aliasing issues.
  *
- * \version $Id$
  * \author Bernie Innocenti <bernie@codewiz.org>
  *
  * $WIZ$ module_name = "heap"
@@ -85,6 +88,7 @@ void *heap_allocmem(struct Heap* heap, size_t size);
 /// Free a chunk of memory of \a size bytes from the heap
 void heap_freemem(struct Heap* heap, void *mem, size_t size);
 
+size_t heap_freeSpace(struct Heap *h);
 
 #define HNEW(heap, type) \
        (type*)heap_allocmem(heap, sizeof(type))
@@ -101,12 +105,19 @@ void heap_freemem(struct Heap* heap, void *mem, size_t size);
 
 #if CONFIG_HEAP_MALLOC
 
+/**
+ * \name Compatibility interface with C standard library
+ * \{
+ */
 void *heap_malloc(struct Heap* heap, size_t size);
 void *heap_calloc(struct Heap* heap, size_t size);
 void heap_free(struct Heap* heap, void * mem);
+/** \} */
 
 #endif
 
+/** \} */ //defgroup heap
+
 int heap_testSetup(void);
 int heap_testRun(void);
 int heap_testTearDown(void);