[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: #1650: Empty program will sometimes do a major GC, sometimes not - f
From: |
Chicken Trac |
Subject: |
Re: #1650: Empty program will sometimes do a major GC, sometimes not - figure out why |
Date: |
Wed, 16 Jun 2021 18:03:18 -0000 |
#1650: Empty program will sometimes do a major GC, sometimes not - figure out
why
---------------------------------------+----------------------
Reporter: sjamaan | Owner: sjamaan
Type: task | Status: assigned
Priority: major | Milestone: 5.3
Component: core libraries | Version: 5.1.0
Resolution: | Keywords:
Estimated difficulty: medium |
---------------------------------------+----------------------
Comment (by megane):
This randomness can be fixed by changing the line
{{{srand(C_fix(time(NULL)));}}} in {{{runtime.c}}} to
- {{{srand(C_fix(42));}}} for no GC, or
- {{{srand(C_fix(424242));}}} for always GC.
You can test with this:
{{{
for i in `seq 30`; do
echo "---------------- $i"
sleep 1
for j in `seq 5`; do
./empty -:g |& grep resized || true
done
done
A run without the "fixes":
---------------- 1
[GC] resized heap to 3145728 bytes
[GC] resized heap to 3145728 bytes
[GC] resized heap to 3145728 bytes
[GC] resized heap to 3145728 bytes
[GC] resized heap to 3145728 bytes
---------------- 2
---------------- 3
[GC] resized heap to 3145728 bytes
[GC] resized heap to 3145728 bytes
[GC] resized heap to 3145728 bytes
[GC] resized heap to 3145728 bytes
[GC] resized heap to 3145728 bytes
---------------- 4
---------------- 5
[GC] resized heap to 3145728 bytes
[GC] resized heap to 3145728 bytes
[GC] resized heap to 3145728 bytes
[GC] resized heap to 3145728 bytes
[GC] resized heap to 3145728 bytes
---------------- 6
---------------- 7
---------------- 8
---------------- 9
---------------- 10
[GC] resized heap to 3145728 bytes
[GC] resized heap to 3145728 bytes
[GC] resized heap to 3145728 bytes
[GC] resized heap to 3145728 bytes
[GC] resized heap to 3145728 bytes
}}}
--
Ticket URL: <https://bugs.call-cc.org/ticket/1650#comment:8>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.
- Re: #1650: Empty program will sometimes do a major GC, sometimes not - figure out why,
Chicken Trac <=