I have the following question. I am not if it is possible and how.
I want understand when the code are using an memory address allocated in heap (for all type of objects built-in and user define).
char* p= new char; strcpy(p,"home"); // statement A
There is a way to understand that “statement A” is using the address “p” allocated in heap ?
By redefining operator new, I can store the heap addresses but how to understand when some instructions are using them ?
I’d like to do this in transparent way for the user.
Thanks a lot
****** An example
char* p= new char; delete  p; strcpy(p,"home"); // statement A
I want warning this invalid memory access.
To do this I must understand that strcpy are trying to access to the address p so i can perform some test on validity of p.