Files
rippled/include
Ed Hennis 0ded97ba5b Make the getKeys() allocation more robust
- Make it very unlikely that the allocation loop will ever need to run
  more than once. Recover gracefully if it does.
- Prevent livelock by limiting the total possible number of iterations.
  - If this ever happens, throw our metaphorical hands in the air, and
    allocate under lock.
- Pad the size before allocating to give the cache a little room to grow
  while not holding the lock.
  - Pad by less on each iteration.
- Assert that no more than two iterations occur. Even two is probably
  overkill, but this allows for rare edge case scenarios. e.g. The
  cache is very small, the allocation takes a long time (which is
  contradictory) and a handful of items get added, overcoming the
  padding.
2026-06-30 16:13:11 -04:00
..