miri::borrow_tracker::stacked_borrows

Module stack

Source

Structsยง

  • Extra per-location state.
  • StackCache ๐Ÿ”’
    A very small cache of searches of a borrow stack, mapping Items to their position in said stack.

Constantsยง

  • CACHE_LEN ๐Ÿ”’
    Exactly what cache size we should use is a difficult trade-off. There will always be some workload which has a BorTag working set which exceeds the size of the cache, and ends up falling back to linear searches of the borrow stack very often. The cost of making this value too large is that the loop in Stack::insert which ensures the entries in the cache stay correct after an insert becomes expensive.