[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Mintlib / posix regex / alloca and malloc



Am 04.06.2011, 11:16 Uhr, schrieb Alan Hourihane <alanh@fairlite.co.uk>:

On 06/03/11 21:44, m0n0 wrote:

Hello,

what reasons are there why the mintlib is compiled without support for
malloc? Currently it uses alloca.
Netsurf crashes with some pages when used with mintlib regex + alloca
(the crashes can be avoided (sometimes) by setting the stack really
big (3MB and more...), but it's not a real solution...). When mintlib
get's compiled with -DREGEX_MALLOC all the pages known to trigger the
error are working fine.

The only thing which I can think of is speed & memory fragmentation.
But on the other hand, I don't believe that someone uses his/her
atari  24h a day / 360 days a year... so memory fragmentation maybe
isn't that important.

the other thing is speed, but I would prefer a stable regex
implementation over one that has bugs.

What do people think, would it be good to make REGEX_MALLOC the default?

In our situation, I think it probably makes sense to compile regex with
REGEX_MALLOC, and then we don't need to bump the stack for these
applications. It's painful enough with the stack troubles, that I'm
inclined to enable this.

Anyone have any conflicts with the change ?

Is there a benchmark about the impact on speed?

--
Helmut Karlowski