Update 'Step 0: ECS Architecture'
parent
f207e1c83f
commit
0a3198317c
|
@ -74,3 +74,5 @@ typedef struct MemPool
|
||||||
```
|
```
|
||||||
The first three fields are generic fields about the memory pool. The `use_list` and the `free_list` are used to keep track of which elements are free and in use.
|
The first three fields are generic fields about the memory pool. The `use_list` and the `free_list` are used to keep track of which elements are free and in use.
|
||||||
A queue is used for the free list so that each element can be used evenly. A boolean array is used to keep track of whether an element is in use. It's a bit easier on the mind doing this way although it is not as memory efficient.
|
A queue is used for the free list so that each element can be used evenly. A boolean array is used to keep track of whether an element is in use. It's a bit easier on the mind doing this way although it is not as memory efficient.
|
||||||
|
|
||||||
|
For this implementation, the buffer is _statically allocated_. This imposes a **hard limit** on the number of entities and components in the game.
|
Loading…
Reference in New Issue