diff options
Diffstat (limited to 'mempool/include')
-rw-r--r-- | mempool/include/mempool.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mempool/include/mempool.h b/mempool/include/mempool.h index 994e25a..b76ae7c 100644 --- a/mempool/include/mempool.h +++ b/mempool/include/mempool.h | |||
@@ -100,14 +100,14 @@ | |||
100 | // ----------------------------------------------------------------------------- | 100 | // ----------------------------------------------------------------------------- |
101 | 101 | ||
102 | typedef struct BlockInfo { | 102 | typedef struct BlockInfo { |
103 | bool used; | 103 | size_t next; /// For free blocks, points to the next free block. |
104 | bool used; | ||
104 | } BlockInfo; | 105 | } BlockInfo; |
105 | 106 | ||
106 | typedef struct mempool { | 107 | typedef struct mempool { |
107 | size_t block_size_bytes; | 108 | size_t block_size_bytes; |
108 | size_t num_blocks; | 109 | size_t num_blocks; |
109 | size_t next_free_block; | 110 | size_t head; /// Points to the first block in the free list. |
110 | bool full; | ||
111 | bool dynamic; /// True if blocks and info are dynamically-allocated. | 111 | bool dynamic; /// True if blocks and info are dynamically-allocated. |
112 | BlockInfo* block_info; | 112 | BlockInfo* block_info; |
113 | uint8_t* blocks; | 113 | uint8_t* blocks; |