Re: how can I trust glib when it has so many mem leaks?



On Thu, Mar 18, 1999 at 02:32:20PM -0700, Kevin Handy wrote:
> john@giorgio.hart.bbk.ac.uk wrote:
> 
> Instead of testing 'slist' construction, which is mostly what your test
> program is doing, I modified it to create 100 blocks of memory, and then
> free them (to attempt to get a reasonable usage), so that the only
> difference between the two sets of code is just the allocator used. I am
> also allocating various different sizes of memory.

Strange (that glib was ever faster). To my anderstanding g_malloc is
just a wraper for malloc an shuld be one functioncall overhed slover!

It is only when using memory shunks that glib alloc room for more
equaly sized objects in one malloc and then just hands them out. When
individual objects is freed the shunk is keept but if You destroy
the hole shunk the memory is actuly freed... Or??? Should I red the
source before making more stuped questions ;-) ?

What i try to say anyway is that it is relativly pointless profiling
g_alloc / malloc. List nods (witch are shrunks in glib) versus
malloc do make more sens to profile....

/Lars



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