Re: [Vala] Help with Memory Leak



On Thu, 2012-07-12 at 10:45 -0400, Bruce Reidenbach wrote:
After working with Jürg on this for the past week, and running some
experiments with valgrind and the memory profiler, it appears that what is
actually happening is heap fragmentation, which causes the heap to grow.
If I run the test case with the printf statment for 12 hours, the heap size
remains constant.  If I run the normal case setting the radioMenuItem
label, the heap grows by about 1 MiB in a 9 hour period.

If this is really due to heap fragmentation, then there
must be a bug in the underlying malloc and free. I can't
imagine the memory keeps growing when all the dynamics are
due to getting and freeing memory for labels between
10 to 36 characters in length. Initially, we will create
useless fragments. But, due to the pigeon-hole principle
(http://en.wikipedia.org/wiki/Pigeonhole_principle)
those fragments cannot remain entirely un-recyclable
even if "free" is very unthinkably simplistic and does not
merge adjacent fragments.

hand
Nor Jaidi Tuah





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