Re: [gtk-list] Re: how can I trust glib when it has so manymemleaks?
- From: Ionutz Borcoman <borco borco-ei eng hokudai ac jp>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: how can I trust glib when it has so manymemleaks?
- Date: Thu, 18 Mar 1999 10:34:42 +0000
Hi,
I have recompiled my glib with #define MEM_PROFILE and #define MEM_CHECK
uncommented in gmem.c. Putting a g_mem_profile at the end of my program,
I get this:
GLib-INFO: 1 allocations of 4 bytes
GLib-INFO: 1 allocations of 8 bytes
GLib-INFO: 1 allocations of 32 bytes
GLib-INFO: 2 allocations of 52 bytes
GLib-INFO: 2 allocations of 1024 bytes
GLib-INFO: 2196 bytes allocated
GLib-INFO: 36 bytes freed
GLib-INFO: 2160 bytes in use
The same ammount of memory that ccmalloc used to found. Now ccmalloc
claims all the allocated is garbage and nothing is freed. How can I
interpret these readings ?
A functions that frees memory managed by glib would be more than
wellcome. Or a change in the g_mem_profile to say: "xxx memory manged
internaly by glib. this is not mem leak" Or something similar.
TIA,
Ionutz
PS: the code to reproduce this is:
#include <glib.h>
int main()
{
GString *s = g_string_new("xxx");
g_string_free(s, TRUE);
g_mem_profile();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]