[Top][All Lists]

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

memory allocation clarification

From: jose vilmar estacio de souza
Subject: memory allocation clarification
Date: Wed, 17 Feb 2010 22:58:35 -0200

Hi all,
I am trying to debug a problem that is present in sd_ibmtts.

looking at the code, I got the feeling that the command malloc is being 
used to allocate memory and the command g_free is being used to release 
the same memory.

I found the folloing at 

It's important to match |g_malloc()| 
with |g_free()| 
plain |malloc()| with |free()|, and (if you're using C++) new with 
delete and new[] with delete[]. Otherwise bad things can happen, since 
these allocators may use different memory pools (and new/delete call 
constructors and destructors).

Am I missing something?

-------------- next part --------------
An HTML attachment was scrubbed...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]