Skip to content

possible memory leak in use of RegexSet #875

Closed
@BurntSushi

Description

@BurntSushi

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions