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

Re: malloc vs g_malloc



Markus Lausser <sgop@users.sourceforge.net> writes:
> 
> Is it possible to mix g_malloc (e.g. g_strdup_printf()) and then a normal
> free() instead of a g_free() ?
> 
> I do mix them in my application and it seems to be ok under linux, but maybe
> this could be the reason for the instability under Solaris, etc.
> 
> Could it be?
> 

It is not allowed, no. It does work by default, because by default
g_malloc() is a malloc() wrapper.

But in principle g_malloc()/g_free() must always be paired, they may
be a different allocator from plain malloc().

Havoc




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