aboutsummaryrefslogtreecommitdiffstats
path: root/include/free_list.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/free_list.h')
-rw-r--r--include/free_list.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/free_list.h b/include/free_list.h
index 887167b..1993aa7 100644
--- a/include/free_list.h
+++ b/include/free_list.h
@@ -15,6 +15,7 @@
#include <stdlib.h>
#include "constants.h"
+#include "alloc_header.h"
typedef struct free_nd {
size_t size;
@@ -34,9 +35,12 @@ free_nd *fl_find_first_fit(free_nd *free_list, size_t size);
* specified node cannot be split (e.g., it's an exact match for size
* within alignment restrictions), simply remove it from the list.
*
+ * If the head of the free list is updated by this operation, the free
+ * list pointer passed as an argument will be updated to reflect this
+ *
* Returns a pointer to the region of memory removed from the list.
*/
-void *fl_split_node(free_nd *free_list, free_nd *nd, size_t size);
+void *fl_split_node(free_nd **free_list, free_nd *nd, size_t size);
/*
* Scans the free list for adjacent nodes and merges them together
@@ -46,7 +50,10 @@ void fl_coalesce_nodes(free_nd *free_list);
/*
* Scans the free list for the correct location for the specified
* pointer, and link it into the list at that point.
+ *
+ * If the head of the free list is updated by this operation, the free
+ * list pointer passed as an argument will be updated to reflect this
*/
-void fl_add_node(free_nd *free_list, void *ptr);
+void fl_add_node(free_nd **free_list, void *ptr);
#endif