guile-user
[Top][All Lists]
Advanced

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

How to avoid large unwanted cell-heap-segments?


From: Roland Orre
Subject: How to avoid large unwanted cell-heap-segments?
Date: Mon, 11 Oct 2004 14:33:00 +0200

Does anyone have any hints about how to avoid large unwanted
cell-heap-segments?

Between these two statistics below, the memory usage has increased
from 460 MB to 640 MB, the only thing being done is performing an
iteration over a vector (3109805 items) and performing a few
array-map! and some float calculations for each vector item.

The only noticable difference are these cell-heap-segments:
(1394960384 . 1575913472) (1578743808 . 1715167232)

After this each garbage collection run takes a lot more time...
If generational gc was implemented then one solution would possibly
be to dedicate a "generation" for static memory.

Ideally I would now want to be able to allocate my data structures
(cells, vectors and uniform vectors) in non gc visible memory, to
not let the garbage collector bother at all about this large static
memory (a data base read from disc). (I could of course do this by
using private structures and smobs, but this implies more work...)

Any hint how I could (easy...) avoid this kind of problem?
About 8 years ago I had a similar problem, then I patched gc.c
and changed the cell heap allocation memory growth.

        Best regards
        Roland Orre

;before
((gc-time-taken . 48862) (cells-allocated . 33781163)
 (cell-heap-size . 33994558) (bytes-malloced . 172137454)
 (gc-malloc-threshold . 179237085) (gc-times . 318)
 (gc-mark-time-taken . 48541) (cells-marked . 1690839800)
 (cells-swept . 3342457125) (malloc-yield . 2) (cell-yield . 42)
 (cell-heap-segments
  (134795264 . 134830080) (1077979136 . 1078243328)
  <snip>
  (1241004032 . 1301637120) (1302587392 . 1393537024)))

;after
((gc-time-taken . 52196) (cells-allocated . 38980360)
 (cell-heap-size . 73511652) (bytes-malloced . 177976821)
 (gc-malloc-threshold . 179237085) (gc-times . 322)
 (gc-mark-time-taken . 51871) (cells-marked . 1837245337)
 (cells-swept . 3545722215) (malloc-yield . 2) (cell-yield . 29)
 (cell-heap-segments
  (134795264 . 134830080) (1077979136 . 1078243328)
  <snip>
  (1241004032 . 1301637120) (1302587392 . 1393537024)
  (1394960384 . 1575913472) (1578743808 . 1715167232)))






reply via email to

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