On Mon, May 12, 2014 at 12:34:36AM +0200, FRIGN wrote: > Hello, > > previously, we allocated one regex_t for each pattern found. > This gets pretty nasty once the tree of patterns grows. > Reusing one regex_t and regfreeing it after each use inside grep() > implies just one simultaneous element in memory and a drastic decrease > in memory-consumption. > > Please let me know what you think!
Applied, thanks. Note that I am not aware of real-life cases where so many -e options are set in order for this to make a "drastic" decrease in memory consumption. I like the code though and it feels simpler.