4 ms·
This looks super impressive! Any chance you could explain how memory management works? Eg is it like rust in that sense? Or is it GC'ed ? Thanks
by chubs 2y ago
This looks super impressive! Any chance you could explain how memory management works? Eg is it like rust in that sense? Or is it GC'ed ? Thanks
- glebbash 2y agoAbsolutely. The memory management is manual like in C, but with addition of defers it is actually quite good to work with. Here is the source for the allocator: https://github.com/glebbash/LO/blob/81f96bb09e3a0b1455b32497da445ff5f71d2907/examples/lib/std.lo#L185 https://github.com/glebbash/LO/blob/81f96bb09e3a0b1455b32497... It also links to where I learned how to build the "proper" allocator from scratch.