Hi, Kevin Ryde <[EMAIL PROTECTED]> writes:
> I'm having trouble in my charting program with the amount of heap space > allocated for cells in 1.8. It ends up allocating more and more heap > (as reported by gc-stats 'cell-heap-segments and confirmed by > mallinfo()), apparently without bound. I've got between 150k and 200k > objects according to gc-live-object-stats, which should be about 5Mb of > cells, but the heap keeps growing to as much as 60Mb. OK, I *think* I hit it with a long-running program with HEAD (this has become visible now that the thing has been running for more than 72 hours...). > (define (total-heap) > (apply + (map (lambda (elem) > (abs (- (cdr elem) (car elem)))) > (assoc-ref (gc-stats) 'cell-heap-segments)))) > > (define (count-alive) > (apply + (map cdr (gc-live-object-stats)))) Note that `count-alive' returns a number of objects, while `total-heap' (which really is "total *cell* heap") returns a number of bytes, right? Thus, the result of `count-alive' should be multiplied by 8 (regular cells) or 16 (double cells). Nevertheless, even when multiplying `count-alive' by 16, I get a `total-heap' an order of magnitude larger, which seems to confirm your hypothesis (that more heap is being allocated despite the availability of free cells). To be continued... Ludo'. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel