Re: [gtk-list] Re: how can I trust glib when it has so many memleaks?




On Thu, 18 Mar 1999, Ionutz Borcoman wrote:
> 
> This is INSANE ! It's like giving a kid a posisoned candy :-(
> How can I differentiate what ccmalloc sais for glib comparred with what
> it says for my program ?

Well, the glib memory caching speeds dynamic data structures up by a large
factor. If that interferes with ccmalloc, well, such is life. 

> I have try to statically link my program in the hope that that memory
> will be released when glib unloads. Never. The garbage is still there.

If the glib code runs then it will use memory. It doesn't matter how you
link it.

> Is glib recovering memory from one instance to another ? How ?
> 

It keeps a pool of memory for different data types, such as linked list
nodes. If you free a linked list node it goes back into the pool. This
avoids calling malloc() and free() all the time; malloc() and free() are
relatively slow functions to use.

> I don't need reasurances that glib has no memory leaks. I whant a way to
> check my program. Maybe I'll believe you that glib has no memory leaks,
> but this is not helping me in debuging my stuff.
> 
> I would be much more happy if glib will report to me that XXX memory has
> been kept for recycling and to see that that XXX. Also, when a program
> is started, to report that YYY memory has been recovered. And a simple
> algorithm, like a function f(garbage, XXX, YYY) that make me sure I
> don't have memory leaks. This should be done for cases when I compile
> glib with debug enabled.
> 

I'm sure the glib guys are taking patches. :-)

Havoc




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