fn mark(&mut self, pointer: PointerIdx) -> usize {
        // remove it from the ranges set, getting the size of the pointer
        let size = self.ranges.remove(&pointer).unwrap();
        // remove it from the free set, by inverse looking up by size
        assert!(self.free.get_mut(&size).unwrap().remove(&pointer));
        // if the pointer was the last of a given size, remove the entry from the map
        if self.free.get(&size).unwrap().is_empty() {
            self.free.remove_entry(&size);
        }
        // return the size of the marked pointer
        return size;
    }
Mark a pointer for use, returns the size of the full allocation
passerine-qualm/src/heap/range_set.rs