Is it possible to detect the memory status ?

Ian Lance Taylor iant@google.com
Wed Jan 28 07:02:00 GMT 2009


Mustafa4LP <mustafa.hussain@nechclst.in> writes:

> Actually, I was amused by the following message issued by glibc on freeing
> the memory twice.
>
> *** glibc detected *** double free or corruption (fasttop): 0x081e9008 ***
>
> I was thinking that the information that the memory is already freed is
> already there.
> can that information be directly used to know that the memory is already
> freed ?

That message from glibc really means "the heap is messed up."  The
message mentions "double free" because that is a fairly common way to
mess up the heap.  However, all glibc really knows for sure is
"corruption."

Ian



More information about the Gcc-help mailing list