g_blow_chunks() doesn't.



Hi.

I am using GLib's g_slist_*() functions.  After each cycle of my
program I am freeing all lists which I have used with either
g_slist_free() or many g_slist_remove()'s and then calling
g_blow_chunks() (great name!).

However, I don't think it is actually freeing any of the slist's
chunks (as it should according to comments in glib.h), because when I
call g_mem_chunk_info() I get, among others, a line like:

        slist mem chunk: 79704 bytes using 80 mem areas

If I run my code so that each program cycle needs more links per list
than the previous, then this count increases.  If I run it so that
each program cycle needs less links per list, then this count stays
the same, so I am pretty sure I'm not forgetting to g_slist_free() all
my lists.

Since some times I will need to use much longer lists than others I
would like to free up this list memory whenever possible.

Can someone tell me what I am missing?

Thanks,
-Brett.



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