Re: [RFC PATCH v3 2/3] grep: make PCRE2 aware of custom allocator

2019-08-08 Thread Johannes Schindelin
Hi René, On Thu, 8 Aug 2019, René Scharfe wrote: > Importing the latest version of nedmalloc might make sense in general. > The last commit in git://github.com/ned14/nedmalloc.git was done five > years ago; is it finished? A diffstat with -b looks like this: > > malloc.c.h | 1193 +

Re: [RFC PATCH v3 2/3] grep: make PCRE2 aware of custom allocator

2019-08-08 Thread René Scharfe
Am 08.08.19 um 14:38 schrieb Carlo Arenas: > On Thu, Aug 8, 2019 at 12:07 AM René Scharfe wrote: >> >> Am 08.08.19 um 04:35 schrieb Carlo Arenas: >>> On Wed, Aug 7, 2019 at 6:03 AM René Scharfe wrote: Am 07.08.19 um 11:49 schrieb Carlo Arenas: > was hoping will perform better but it

Re: [RFC PATCH v3 2/3] grep: make PCRE2 aware of custom allocator

2019-08-08 Thread Carlo Arenas
On Thu, Aug 8, 2019 at 12:07 AM René Scharfe wrote: > > Am 08.08.19 um 04:35 schrieb Carlo Arenas: > > On Wed, Aug 7, 2019 at 6:03 AM René Scharfe wrote: > >> > >> Am 07.08.19 um 11:49 schrieb Carlo Arenas: > >>> was hoping will perform better but it seems that testing can be done > >>> only in w

Re: [RFC PATCH v3 2/3] grep: make PCRE2 aware of custom allocator

2019-08-08 Thread René Scharfe
Am 08.08.19 um 04:35 schrieb Carlo Arenas: > On Wed, Aug 7, 2019 at 6:03 AM René Scharfe wrote: >> >> Am 07.08.19 um 11:49 schrieb Carlo Arenas: >>> was hoping will perform better but it seems that testing can be done >>> only in windows >> >> nedmalloc works on other platforms as well. > > I mean

Re: [RFC PATCH v3 2/3] grep: make PCRE2 aware of custom allocator

2019-08-07 Thread Carlo Arenas
On Wed, Aug 7, 2019 at 6:03 AM René Scharfe wrote: > > Am 07.08.19 um 11:49 schrieb Carlo Arenas: > > was hoping will perform better but it seems that testing can be done > > only in windows > > nedmalloc works on other platforms as well. I meant[1] it works reliably enough to be useful for perfo

Re: [RFC PATCH v3 2/3] grep: make PCRE2 aware of custom allocator

2019-08-07 Thread Junio C Hamano
Carlo Arenas writes: >> > +#ifdef USE_NED_ALLOCATOR >> > +static void *pcre2_malloc(PCRE2_SIZE size, MAYBE_UNUSED void *memory_data) >> > +{ >> > + return malloc(size); >> >> Should this be xmalloc() to get consistent out-of-memory handling? > > good point, note though that since it is inside

Re: [RFC PATCH v3 2/3] grep: make PCRE2 aware of custom allocator

2019-08-07 Thread René Scharfe
Am 07.08.19 um 11:49 schrieb Carlo Arenas: > was hoping will perform better but it seems that testing can be done > only in windows nedmalloc works on other platforms as well. On Debian Testing with GCC 9.1.0 I need two changes to suppress some compiler warnings, though. Will post them as replies

Re: [RFC PATCH v3 2/3] grep: make PCRE2 aware of custom allocator

2019-08-07 Thread Carlo Arenas
On Tue, Aug 6, 2019 at 10:38 PM René Scharfe wrote: > > Am 06.08.19 um 18:36 schrieb Carlo Marcelo Arenas Belón: > > Move some of the logic that was before done per thread (in the workers) > > into an earlier phase to avoid degrading performance > > Which logic is moved? In the patch I basically

Re: [RFC PATCH v3 2/3] grep: make PCRE2 aware of custom allocator

2019-08-06 Thread René Scharfe
Am 06.08.19 um 18:36 schrieb Carlo Marcelo Arenas Belón: > 94da9193a6 (grep: add support for PCRE v2, 2017-06-01) didn't include > a way to override the system allocator, and so it is incompatible with > USE_NED_ALLOCATOR. The problem was made visible when an attempt to > avoid a leak in a data st