This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]