pub fn detect_slice(
records: &[InferenceRecord],
allocations: &[ActiveAllocation],
range_map: &RangeMap,
) -> Vec<RelationEdge>Expand description
Detect Slice relationships for all allocations.
A Slice edge A → B is created when:
- A’s pointer falls strictly inside B’s range:
B.start < A.ptr < B.end - A’s memory range fits within B:
A.ptr + A.size <= B.end - A is small enough:
A.size <= MAX_SLICE_SIZE - A is inferred as FatPtr type (reduces false positives)
§Arguments
records- All inference records with allocation metadata.allocations- Original allocations list for address range lookup.range_map- Pre-built RangeMap for O(log n) address lookups.