diff --git a/freelist/freelist.c b/freelist/freelist.c index 380010f..f9dc531 100644 --- a/freelist/freelist.c +++ b/freelist/freelist.c @@ -6,6 +6,10 @@ #include #include +struct FreeListBlock { + struct FreeListBlock *next; +}; + /* Initialize the FreeList */ int fl_init(FreeList *fl, uintptr_t start, uintptr_t end, size_t itemsize) { size_t size = ALIGN(itemsize); diff --git a/freelist/freelist.h b/freelist/freelist.h index 72a6d84..f0cf7c7 100644 --- a/freelist/freelist.h +++ b/freelist/freelist.h @@ -18,16 +18,14 @@ static inline size_t align_up(size_t n) { #define ALIGN(x) (align_up(x)) #endif // FREELIST_NOALIGN -typedef struct FreeListBlock { - struct FreeListBlock *next; -} FreeListBlock; +typedef struct FreeListBlock FreeListBlock; typedef struct { - uintptr_t start; - uintptr_t end; + uintptr_t start; + uintptr_t end; FreeListBlock *free; - size_t size; - size_t allocated; + size_t size; + size_t allocated; } FreeList; int fl_init(FreeList *fl, uintptr_t start, uintptr_t end, size_t itemsize);