Great explanation, and I thinks it - chaining small blocks - is a perfect compromise between contiguous bytes that need always a marks/sweep for memory reuse, even if declared as not-used/refd-anymore by refCount. I moved away from the refCount even though I had the unused memory peaces linked... but going always through the link and find an unused 'string' greater or equal the needs and re-link the remainder was not an option... last but not least because it would have challenged the virtual memory implementation...
In my memory manager (for MRAM/FRAM) I do though so but only limited: since only strings are used, I update as long as the string fits, and if shorter, it has to be short enough to also fit the linking for the remainder...
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Great explanation, and I thinks it - chaining small blocks - is a perfect compromise between contiguous bytes that need always a marks/sweep for memory reuse, even if declared as not-used/refd-anymore by refCount. I moved away from the refCount even though I had the unused memory peaces linked... but going always through the link and find an unused 'string' greater or equal the needs and re-link the remainder was not an option... last but not least because it would have challenged the virtual memory implementation...
In my memory manager (for MRAM/FRAM) I do though so but only limited: since only strings are used, I update as long as the string fits, and if shorter, it has to be short enough to also fit the linking for the remainder...