Quellcode durchsuchen

Support define macros in Doxygen and small documentation additions

Ioannis Koutras vor 12 Jahren
Ursprung
Commit
583546e6aa

+ 1 - 1
doc/CMakeLists.txt

@@ -5,7 +5,7 @@ IF(DOXYGEN_FOUND)
   MARK_AS_ADVANCED(DOXYGEN_LANGUAGE)
 
 SET( DOXYGEN_SOURCE_DIR
-  "${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/private-include ${CMAKE_SOURCE_DIR}/src"
+  "${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/private-include ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/src"
 )
 
 STRING(REGEX REPLACE ";" " " CMAKE_DOXYGEN_INPUT_LIST "${DOXYGEN_SOURCE_DIR}")

+ 2 - 2
doc/Doxyfile.in

@@ -1497,14 +1497,14 @@ SEARCH_INCLUDES        = YES
 # contain include files that are not input files but should be processed by
 # the preprocessor.
 
-INCLUDE_PATH           =
+INCLUDE_PATH           = @CMAKE_DOXYGEN_INPUT_LIST@
 
 # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
 # patterns (like *.h and *.hpp) to filter out the header-files in the
 # directories. If left blank, the patterns specified with FILE_PATTERNS will
 # be used.
 
-INCLUDE_FILE_PATTERNS  =
+INCLUDE_FILE_PATTERNS  = *.h
 
 # The PREDEFINED tag can be used to specify one or more macro names that
 # are defined before the preprocessor is started (similar to the -D option of

+ 1 - 1
include/dmmlib/allocator.h

@@ -43,7 +43,7 @@ typedef struct allocator_s {
                                       blocks. */
 #endif /* HAVE_LOCKS */
 #ifdef WITH_ALLOCATOR_STATS
-    dmmstats_t dmm_stats;
+    dmmstats_t dmm_stats; /**< Global statistics. */
 #endif /* WITH_ALLOCATOR_STATS */
 } allocator_t;
 

+ 22 - 0
private-include/freelist/freelist.h

@@ -28,9 +28,31 @@
 #include "freelist/freelist_rb.h"
 
 #ifdef FL_RB_ONLY
+
+/** Tries to allocate memory from a specific free-list organized raw block.
+ * @param raw_block The pointer of the freelist-organised raw block.
+ * @param size      The requested size.
+ * @retval          The address of the returned memory space.
+ */
 #define dmmlib_malloc(raw_block, size) freelist_malloc(raw_block, size)
+
+/** Frees the memory block inside of a specific free-list organized raw block.
+ * @param raw_block The pointer of the freelist raw block.
+ * @param ptr       The pointer of the memory block to be freed.
+ */
 #define dmmlib_free(raw_block, ptr) freelist_free(raw_block, ptr)
+
+/**
+ * Reallocates a memory block from a freelist-organized raw block
+ *
+ * @param  raw_block The pointer of the freelist raw block.
+ * @param  ptr       The pointer of the memory block to be re-allocated.
+ * @param  size  The requested memory size.
+ * @retval           The address to serve the request.
+ * @retval NULL      No available memory space.
+ */
 #define dmmlib_realloc(raw_block, ptr, size) freelist_realloc(raw_block, ptr, size)
+
 #endif /* FL_RB_ONLY */
 
 void * freelist_malloc(freelist_rb_t *raw_block, size_t size);

+ 5 - 0
private-include/freelist/linked_lists/lifo_order.h

@@ -30,6 +30,11 @@
 #include "freelist/block_header.h"
 
 #ifdef LIFO_SORT_POLICY
+/** Adds a block in a linked list.
+ *
+ * @param raw_block The pointer to the raw block.
+ * @param block The pointer of the block to be added.
+ */
 #define add_block(raw_block, block) add_block_lifo_order(raw_block, block)
 #endif /* LIFO_SORT_POLICY */
 

+ 5 - 0
src/freelist/freelist_malloc.c

@@ -38,6 +38,11 @@
 #include "dmmlib/dmmlib.h"
 #endif /* WITH_ALLOCATOR_STATS */
 
+/**
+ * Tries to find the best available free memory block
+ *
+ * @param size The requested size
+ */
 #if defined (BEST_FIT)
 #define search_on_free(size) best_fit_on_freelist(raw_block, size)
 #elif defined (GOOD_FIT)