Closed
Description
Discussed in #874
Originally posted by adamchalmers June 22, 2022
Hi! I'm trying to find the source of some memory leaks in a gRPC server my team is building. One of the endpoints runs some RegexSets over some inputs.
I'm using dhat to measure memory usage, and I notice running RegexSet::matches(field).into_iter().next()
adds around 2.4kb of memory leak per run. I know the RegexSets have an internal cache where they store programs. I was wondering if this cache grows unboundedly? Is it possible to put a limit on the cache size, or to describe the cache behaviour in the crate's docs?