- All Implemented Interfaces:
- AllocationContext
public class HashedAllocationContext
extends java.lang.Object
implements AllocationContext
an AllocationContext that uses a hash value for comparison. This is
lossy - heap implementations using this class have to check/handle
collisions.
However, given that we have very good hash data (search global object
references), the probability of collisions is low enough that heap
implementations might simply report this as a problem requiring a
non-lossy AllocationContext.
Ideally, we would like to hash the host VM thread context too (esp.
for system allocations), but host VM stack traces are expensive, and it is
arguable if would be too strict (e.g. when using a dedicated allocator
method called from alternative branches of the caller)
note - this is a HashMap key type which has to obey the hashCode/equals contract