Incremental garbage collection
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Fri Jan 21 21:29:06 UTC 2022
On Friday, 21 January 2022 at 20:22:15 UTC, Guillaume Piolat
wrote:
> Well I was using the term incorrectly, "amortized" in the sense
> the large majority of callback will not allocate, so in other
> words, the opposite :)
Yes, that is different, but actually using a stackless coroutine
can be a solution to spread out the load when you need to. In D I
guess you could have do it as a state machine using a switch
statement. I've never done this in practice though…
> pushack_back leading to realloc can make a lot more trouble
> because it moves large amount of memory. Delay lines may need
> to be allocated with a max size / pessimized for that reason.
What is pushack_back? You can also build a delay with a chain of
smaller fixed size buffers, although a bit unusual perhaps. If
you need a filter you can do that in a smaller buffer. So many
implementation options!
More information about the Digitalmars-d
mailing list