Re: g_free() vs. free()
- From: Guy Harris <gharris flashcom net>
- To: Farooq Mela <f_mela yahoo com>
- Cc: gtk-list gnome org
- Subject: Re: g_free() vs. free()
- Date: Fri, 30 Jun 2000 23:29:37 -0700
On Fri, Jun 30, 2000 at 05:33:49PM -0700, Farooq Mela wrote:
> I think I read that the g_malloc()
> function maintains it's own list of allocated
> addresses..
If GLib is compiled with ENABLE_MEM_PROFILE or ENABLE_MEM_CHECK defined,
"g_malloc()" is more than just a simple wrapper around "malloc()", and
"g_free()" is more than just a simple wrapper around "free()" - in such
a fashion that, as Havoc notes, you should "g_free()" stuff allocated
using "g_malloc()" (and you shouldn't even do that if you "know" that
GLib wasn't compiled with either of those defined; your program might,
in the future, be linked or run against a library built with them
defined, and I don't know that the GLib developers have made a
committment that GLib compiled with no options will always only have
"g_malloc()" and "g_free()" as simple wrappers that let you "free()"
stuff allocated with "g_malloc()").
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]