smbanasik / SBLib

A library meant to serve as a competitor to the standard library.
MIT License
0 stars 0 forks source link

Array List #4

Open smbanasik opened 5 months ago

smbanasik commented 5 months ago

This container is essentially a linked list of arrays. The user defines a type and unit array size, then that much is reserved.

A more advanced version of this would allow for dynamic array sizes, where a memory is allocated contiguously until it's no longer possible to do so. The first 4 bytes of this array contain a pointer that would lead to the next piece of the array (this pattern is repeated for each array), and a lookup table could be used to determine the sizes.