correcting more information about mempool.

Kevin Yonan
2022-06-14 22:03:13 -07:00
parent e07987a670
commit 021b37cc3a

@ -15,8 +15,7 @@ By Kevin 'Assyrianic' Yonan @ https://github.com/assyrianic
The memory pool encapsulates two public structs: The memory pool encapsulates two public structs:
* `freeList` which is an abstracted doubly linked list consisting of a `head` and `tail` pointer to `MemNode` * `freeList` which is an abstracted doubly linked list consisting of a `head` and `tail` pointer to `MemNode`
* A `len` that tracks the amount of nodes the linked list holds. * A `len` that tracks the amount of nodes the linked list holds.
* `maxNodes` which is used for auto-defragging (explained below), * an array of doubly linked lists that store fixed size blocks called `buckets`.
* and `autoDefrag` which controls whether auto-defragging will execute or not.
```c ```c
typedef struct MemNode { typedef struct MemNode {
size_t size; size_t size;
@ -25,7 +24,7 @@ The memory pool encapsulates two public structs:
typedef struct AllocList { typedef struct AllocList {
MemNode *head, *tail; MemNode *head, *tail;
size_t len, maxNodes; size_t len;
} AllocList; } AllocList;
``` ```