Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: It's time for 5.0.1

On Wed, 12 Dec 2012 00:14:11 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> The problem with this is that the better zhalloc() is at filling up
> the Heap arenas, the harder freeheap() has to work -- because it ends
> up managing a Heapstack for each of a bunch of useless [that is,
> full] Heap arenas.  At that point it'd be much better if it just
> pushed the entire heaps list and started over from scratch.

I think this all fits with what I roughly thought was going on.

One point about the above is that if we keep the heap size small, 16384
instead of ~ 10 times as much, it's much less wasteful to forget about
heapstacks altogether and simply mark the current heap and start a new
one when you push.  Then you just have the one linked list and
everything stays linear.  I think wasting something of order 16 kB each
time we push (and getting it back when we pop) is probably neither here
nor there these days.  Given that, so far as I know, actually allocating
a new heap isn't a bottlenec, that might be a way forward.

I'm not 100% sure what's going on with switch_heaps(), but you might
hope it was agnostic about the underlying heap implementation.


Messages sorted by: Reverse Date, Date, Thread, Author