Re: [dev] [sbase] [PATCH] Make grep more memory-efficient

From: Dimitris Papastamos <sin_AT_2f30.org>
Date: Mon, 12 May 2014 00:36:12 +0100

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.
Received on Mon May 12 2014 - 01:36:12 CEST

This archive was generated by hypermail 2.3.0 : Mon May 12 2014 - 01:48:06 CEST