This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] Small regexec.c fixes
- From: "Paolo Bonzini" <bonzini at gnu dot org>
- To: "Jakub Jelinek" <jakub at redhat dot com>,"Ulrich Drepper" <drepper at redhat dot com>,"Roland McGrath" <roland at redhat dot com>,<libc-alpha at sources dot redhat dot com>
- Date: Thu, 1 Jan 2004 02:28:35 +0100
- Subject: Re: [PATCH] Small regexec.c fixes
[moved to libc-alpha cos I cannot post to libc-hacker]
> > I've applied the patch but in general we should avoid adding much code
> > to free memory in case allocation fails.
>
> I disagree completely. It is important that library code never leak.
I agree with Roland, but I also think that malloc is showing up high enough in the
profile that regex should have its own memory management, possibly using pooling and
surely using something like obstacks to allocate memory fast (it was suggested by
Jakub a year ago, IIRC). It may get a 4-5% performance improvement, also replacing
all the REG_ESPACE tests with longjmps. Sooner or later I'll get round to doing it.
Paolo