|
From: Sky D. <sdn...@ya...> - 2011-03-12 16:12:01
|
Hi all,
Recently I am trying to understand the mechanism of ptrcheck, which can detect
the incorrect heap reference. There is one statements in manual, "Ptrcheck keeps
track of which heap block (if any) it was derived from". I thought that it means
every pointer has an associated struct (or something like that) to record such
information. Yet I failed to find such struct. So I couldn't understand the
implementation of ptrcheck's heap instrumentation.
Can anyone explain the implementation for me? Or tells me how ptrcheck can store
the association between the pointer and the heap block.
Any kind explanation is appreciated! Thank you in advance!
All the best,
Xuefeng Dai
|