|
@@ -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 */
|