[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-hackers] [PATCH] Re: Heap resizing needs to pick up the pace to
From: |
Peter Bex |
Subject: |
[Chicken-hackers] [PATCH] Re: Heap resizing needs to pick up the pace to match mutation stack resizing! |
Date: |
Wed, 27 Jun 2012 20:18:37 +0200 |
User-agent: |
Mutt/1.4.2.3i |
On Tue, Jun 26, 2012 at 09:56:51PM +0200, Peter Bex wrote:
> The attached patch is a hack, but it makes the error go away because it
> allows the heap size to keep up with the mutation stack size. It doesn't
> take care of the size of the live finalizers, and it mutates heap_size in
> such a way that you can't read back the heap_size value to determine the
> current heap size; it just hacks the system into thinking that's the
> current heap size so when it's growing it needs to take that into account.
I think the patch is a stab in the right direction, but that calculation is
not near precise enough. The bug can be triggered more easily by passing a
low heap growth percentage, for example:
./test/finalizer-error-test.scm -:hg110
This causes the test to fail even on i386. Even if the heap growth is
just over 100%, it shouldn't ever crash (it is, after all, _growing_).
All sorts of annoying details of other types of memory that get copied
into the heap shouldn't have to bother the user; the heap growth
percentage is (AFAIK) just supposed to be an optimization hint.
I propose the attached patch to help us keep track of this bug more
closely. I tightened up the tests a LOT by making it only grow by 105%,
stressing the code more for this edge case.
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
0001-Tighten-up-the-finalizer-tests-so-it-fails-in-all-si.patch
Description: Text document
- [Chicken-hackers] GC and heap growth percentage question, Peter Bex, 2012/06/23
- Re: [Chicken-hackers] GC and heap growth percentage question, Felix, 2012/06/23
- Re: [Chicken-hackers] GC and heap growth percentage question, Peter Bex, 2012/06/23
- Re: [Chicken-hackers] GC and heap growth percentage question, Felix, 2012/06/24
- Re: [Chicken-hackers] GC and heap growth percentage question, Peter Bex, 2012/06/24
- Re: [Chicken-hackers] GC and heap growth percentage question, Peter Bex, 2012/06/24
- Re: [Chicken-hackers] GC and heap growth percentage question, Peter Bex, 2012/06/24
- Re: [Chicken-hackers] GC and heap growth percentage question, Felix, 2012/06/24
- [Chicken-hackers] [INCOMPLETE PATCH] Heap resizing needs to pick up the pace to match mutation stack resizing! [Was: Re: GC and heap growth percentage question], Peter Bex, 2012/06/26
- [Chicken-hackers] [PATCH] Re: Heap resizing needs to pick up the pace to match mutation stack resizing!,
Peter Bex <=
- Re: [Chicken-hackers] [PATCH] Re: Heap resizing needs to pick up the pace to match mutation stack resizing!, Peter Bex, 2012/06/30