A simulated heap memory and dynamic array implementation with it. Useful for making 2D lists or passing lists as function arguments. Click "see inside".
I feel like I’m writing C in Scratch :) - - - - - - - - - - Change Log - - - - - - - - - - v3.0.1 - 11 Jul 2025 ● Add underscore prefix for "mem - fragments". v3.0 - 19 Mar 2025 ● Rewrite the allocation logic. ● Add the reallocate function. ● Lists now use reallocate instead of allocating and freeing manually. ● Rename the prefix keyword "heap" to "mem". v2.0.1 - 19 Apr 2025 ● Rearrange some blocks. v2.0 - 7 Dec 2024 ● Improve the performance of heap allocation massively, but freeing data now requires length. ● Remove multidimensional debug output and drop. v1.1 - 6 Jul 2024 ● Swap the order in which pointer, length, and capacity are stored in lists. ● Make debug output and drop work for multidimensional lists with only one function call. v1.0 - 6 Jun 2024 ● The project is created.