[PATCH 2 of 2] osutil.c: replace alloca() with malloc() and remove <alloca.h>
Benoit Boissinot
bboissin at gmail.com
Sun Oct 7 21:26:46 UTC 2007
On 10/7/07, Giorgos Keramidas <keramida at ceid.upatras.gr> wrote:
> # HG changeset patch
> # User Giorgos Keramidas <keramida at ceid.upatras.gr>
> # Date 1191783522 -10800
> # Node ID 5d13d2d3f42bc150f711bfa3a8bb38a7d0b5c1d4
> # Parent 37dc732e00416a50dcc9b994961acdb6ceb755ba
> osutil.c: replace alloca() with malloc() and remove <alloca.h>
>
> The <alloca.h> header is not really portable, and it breaks Mercurial on
> FreeBSD. Remove the dependency on <alloca.h> and alloca() by replacing
> the only place where it was used with malloc().
Have you done a performance test to see wether it has an impact or not ?
(I think alloca is defined in stdlib.h in freebsd)
regards,
Benoit
More information about the Mercurial-devel
mailing list