Compare commits

..

2 commits

Author SHA1 Message Date
Imbus
de6aee3a3a Move FreeListBlock internal into source 2025-09-08 08:48:34 +02:00
Imbus
682901cafd Remove unused defines FL_FREE, FL_USED 2025-09-08 08:48:19 +02:00
2 changed files with 9 additions and 10 deletions

View file

@ -6,6 +6,10 @@
#include <stdlib.h>
#include <string.h>
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);

View file

@ -18,12 +18,7 @@ static inline size_t align_up(size_t n) {
#define ALIGN(x) (align_up(x))
#endif // FREELIST_NOALIGN
#define FL_FREE ((uint8_t)0x00)
#define FL_USED ((uint8_t)0x01)
typedef struct FreeListBlock {
struct FreeListBlock *next;
} FreeListBlock;
typedef struct FreeListBlock FreeListBlock;
typedef struct {
uintptr_t start;