Should be easy to assert that the address passed to FixedMalloc free didn't come from FixedMalloc::Alloc.
Created attachment 414274 [details] [diff] [review] Patch Here's a basic solution. Two refinements are easily imagined: - a more sophisticated data structure to track large blocks to make it less likely that the linear scan will make debug builds really slow - we could assert that the small-object pointer points to and object (not just into one) and that that object is not free, not simply that it points into a block's memory area.
Comment on attachment 414274 [details] [diff] [review] Patch My plan for large blocks was to just assert that the GCHeap had a HeapBlock inUse at that address that was the right size, much simpler, almost as effective. This technique is a little better as it guards against coincidental positives from other GCHeap clients.
redux changeset 3229:6e00ccd98704
Reopening because it probably needs a tweak so as not to upset the sampler.
Created attachment 416912 [details] [diff] [review] Fall back on non-allocation if AVMPLUS_SAMPLER is defined
redux changeset: 3329:d7162814f1f5
Engineering work item. Marking as verified.