36 |
|
struct Block* next; /*!< Next in our chain of blocks */ |
37 |
|
void* elems; /*!< Points to allocated memory */ |
38 |
|
dlink_list free_list; /*!< Chain of free memory blocks */ |
39 |
– |
dlink_list used_list; /*!< Chain of used memory blocks */ |
39 |
|
}; |
40 |
|
|
41 |
|
typedef struct Block Block; |
56 |
|
int freeElems; /*!< Number of free elements */ |
57 |
|
Block* base; /*!< Pointer to first block */ |
58 |
|
const char *name; /*!< Name of the heap */ |
59 |
< |
struct BlockHeap *next; /*!< Pointer to next heap */ |
59 |
> |
dlink_node node; |
60 |
|
}; |
61 |
|
|
62 |
|
typedef struct BlockHeap BlockHeap; |
77 |
|
LIBIO_EXTERN unsigned int block_heap_get_used_elm(const BlockHeap *); |
78 |
|
LIBIO_EXTERN unsigned int block_heap_get_free_elm(const BlockHeap *); |
79 |
|
LIBIO_EXTERN unsigned int block_heap_get_size_elm(const BlockHeap *); |
80 |
< |
LIBIO_EXTERN const BlockHeap *block_heap_get_heap_list(void); |
80 |
> |
LIBIO_EXTERN const dlink_list *block_heap_get_heap_list(void); |
81 |
|
|
82 |
|
#else /* NOBALLOC */ |
83 |
|
|