On 23/06/2011 22:13, Florian Klämpfl wrote:
Am 23.06.2011 23:03, schrieb Martin:
And what exactly does checkpointer check?
Check if the pointer points into a allocated memory block.
Ok, that would actually work.
even without keep_released it could catch quite some
It should check, that it points to the correct place inside an allocated
block (That is String^ := AllocAddr + SizeOf(StringLen) + SizeOf(StrRefCnt)
It could even check, that the refcount is not zero.
If the memory has not yet been reallocated, that should fail, if the
string was released (assuming the last DecRefCnt, actually set's it to
zero, before releasing the memory) (Would not work with -gt => since
then all values are trashed)
It would definitely be a good start.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel