From: James Antill <james@va...> - 2001-03-22 21:55:40
Ben Woodard <ben@...> writes:
> Mark, You pointed out a while back that malloc and free are
> incompatible with gmalloc and gfree. Why is that.
Well the implementation in both 1.2.x and 1.3.2 has
g_malloc()/g_free() compatible with malloc()/free() as long as you
don't enable ENABLE_MEM_PROFILE or ENABLE_MEM_CHECK, or dmalloc().
However I'm pretty sure it's not guaranteed to work in 1.6.x or 2.0.x
The big problem however is that a bunch of things in glib _don't_ use
g_malloc(). For instance if we start passing g_string_new() return
values around then they _have_ to be free'd using g_string_free().
> It really makes it
> very annoying.
Can we not just make it so that each object we send out has a
corresponding free function. So we'd have...
...this way we can change the underlying allocator without breaking
James Antill -- james@...