Check if a pointer points to allocated memory on the heap.

Posted by Ugo on Stack Overflow See other posts from Stack Overflow or by Ugo
Published on 2010-06-17T19:48:37Z Indexed on 2010/06/17 19:53 UTC
Read the original article Hit count: 176

Filed under:
|
|
|
|

Ok, I know this question seems to have been asked many times on stackoverflow.
but please read

Well the answer for any address is "No you can't" but the question here is to know if a pointer points to a piece of memory allocated with malloc/new.
Actually I think it could be easily implemented overriding malloc/free and keeping track of allocated memory ranges.

Do you know a memory management library providing this specific tool ?

© Stack Overflow or respective owner

Related posts about c++

Related posts about c