On Thu, 9 Sep 2021, Iain Duncan wrote:

Is there a way to pre-emptively make the heap big from c or scheme, aside from compiling in a default size?
(set! (*s7* 'heap-size) ...)

So I'm wondering if it would be reasonable to give users an option to trade size for speed by allocating a big hunk of memory and cleaning up when it doesn't matter.
That is very reasonable, but note that you cannot shrink the heap.

does a heap resize take a long time?
It requires copying the entire heap. Probably not something you would want to do in real-time.

Do they take progressively more time (ie does the heap double or somesuch thing)
Yes, it doubles. (Obviously this also means you're asymptotically less likely to need a resize as time goes on...)

 -E
_______________________________________________
Cmdist mailing list
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to