chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Improve heap shrinkage calculation


From: felix . winkelmann
Subject: Re: [PATCH] Improve heap shrinkage calculation
Date: Mon, 02 Dec 2019 10:52:32 +0100

> On Sun, Dec 01, 2019 at 11:22:37PM +0100, address@hidden wrote:
> > It seems to work fine, but "-:hs0" doesn't seem to work. I tried
> >
> >     csi -:d -:hs0
> >     > (define x (make-vector 10000000))
> >     > (##sys#gc)
> >     > (##sys#gc)
> >     > ...
> >
> > The heap is still shrunk on each GC. "-:hs100" works, but isn't really
> > useful, as it resizes the heap to the previous value.
>
> I think megane mentioned this on IRC the other day as well.  It looks
> like this has been broken for a while already.
>
> In C_rereclaim2:
>
>   if(size < MINIMAL_HEAP_SIZE) size = MINIMAL_HEAP_SIZE;
>
> If the percentage is zero, "size" will be zero and the line above will
> reset the heap size to the minimal heap size.
>
> Why is -:hs100 not useful?  You don't want it to resize at all?

It still calls C_rereclaim, so the heap is resized without being resized.
You want to omit resizing in that case.


felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]