Browse Source

doc on search algos

Alex Bartzas 13 years ago
parent
commit
d9f7fc4031
1 changed files with 28 additions and 0 deletions
  1. 28 0
      private-include/linked_lists/search_algorithms.h

+ 28 - 0
private-include/linked_lists/search_algorithms.h

@@ -42,6 +42,15 @@
 void * search_on_fixed(heap_t * heap, size_t requested_size);
 #endif /* WITH_FIXED_LISTS */
 
+/**
+ * Perform a best-fit search on free lists for a block of a certain size
+ *
+ * \param heap The heap whose fixed lists should be accessed.
+ * \param requested_size The desired size of the block.
+ *
+ * \return The pointer of the data part of the matched memory block.
+ * \retval NULL No block was found.
+ */
 void * best_fit_on_freelist(heap_t *heap, size_t requested_size);
 
 /**
@@ -56,7 +65,26 @@ void * best_fit_on_freelist(heap_t *heap, size_t requested_size);
  */
 void * good_fit_on_freelist(heap_t *heap, size_t requested_size, float fit_percentage);
 
+/**
+ * Perform an exact-fit search on free lists for a block of a certain size
+ *
+ * \param heap The heap whose fixed lists should be accessed.
+ * \param requested_size The desired size of the block.
+ *
+ * \return The pointer of the data part of the matched memory block.
+ * \retval NULL No block was found.
+ */
 void * exact_fit_on_freelist(heap_t *heap, size_t requested_size);
+
+/**
+ * Perform a first-fit search on free lists for a block of a certain size
+ *
+ * \param heap The heap whose fixed lists should be accessed.
+ * \param requested_size The desired size of the block.
+ *
+ * \return The pointer of the data part of the matched memory block.
+ * \retval NULL No block was found.
+ */
 void * first_fit_on_freelist(heap_t *heap, size_t requested_size);
 
 #endif /* LINKED_LISTS_SEARCH_ALGORITHMS_H */