[gambit-list] Question about garbage collections
Bradley Lucier
lucier at math.purdue.edu
Fri Feb 6 11:56:48 EST 2009
Marc:
When I do the following:
> (##gc-report-set! #t)
> (define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))(define a (time (random-f64vector 10000000)))
then the gc reports are
> *** GC: 75 ms, 1.71G alloc, 382M heap, 76.4M live (20% 55696+80018000)
> *** GC: 64 ms, 2.01G alloc, 382M heap, 76.4M live (20% 55696+80018000)
> *** GC: 64 ms, 2.31G alloc, 382M heap, 76.4M live (20% 55696+80018000)
> *** GC: 64 ms, 2.61G alloc, 382M heap, 76.4M live (20% 55696+80018000)
> *** GC: 64 ms, 2.91G alloc, 382M heap, 76.4M live (20% 55696+80018000)
but after the computations are over I get
> (##gc)
*** GC: 28 ms, 2.98G alloc, 153M heap, 76.4M live (50% 54064+80018000)
>
So during the computation the heap size is set to five times the live
size, which I did not expect, and after the computation the heap size is
set to only twice the live size, which I did expect.
What behavior should I expect from the gc? Setting the heap to five
times the live size seems pretty extreme.
Brad
More information about the Gambit-list
mailing list