On Wed, 2004-09-15 at 16:37, bulia byak wrote:
On Wed, 15 Sep 2004 16:15:51 -0300, bulia byak <buliabyak@...400...> wrote:
I have a rather big and complex document (500 Kb SVG) containing many icons which I export individually. I noticed that after each export the inkscape task grabs about 5% of my total memory (512 Mb) and never releases it.
Here's another way to reproduce that: run Inkscape with another document and from it, open and close that 500 Kb document. This eats even more memory, about 7%, though after some time 1% is freed back and only 6% remain grabbed permanently. Every open/close of the document consistenly adds 6% to the total memory occupied by Inkscape. So it looks like something somewhere is not freed when it should be freed.
While it does sound like there may be a problem with memory leakage, as we debug this, please bear in mind that even under normal circumstances there will be some slush, because:
* malloc() claims memory from the OS in large blocks and divvies them up to satisfy smaller allocations; those blocks cannot be returned to the OS unless every single allocated region within them is freed
(even then, it cannot always be returned to the OS due to other contraints, such as those brk() is subject to on Unix systems)
* the garbage collector inherently introduces a small amount of slush, since it doesn't free memory immediately after it becomes unused
Such memory will eventually get reused, however, so in the absence of leaks you are not likely to see the kind of extreme growth you are seeing.
IIRC, valgrind can identify the source of memory leaks, so that might be worth a go.
-mental