[GRASS5] RE: [GRASS-CVS] scott: grass6/raster/simwe/r.sim.water main.c,1.9,1.10
Glynn Clements
glynn at gclements.plus.com
Tue Jan 24 05:38:50 EST 2006
Markus Neteler wrote:
> does anyone know how the malloc.h should be done below?
> AFAIK, GRASS is free of malloc.h except for below code.
Simply remove it.
The only legitimate reason to include malloc.h is if you want to use
certain platform-specific features such as mallopt() or providing your
own allocator.
The standard ANSI functions (malloc, calloc, realloc, free) are all
declared in <stdlib.h>.
Usage of <malloc.h> normally indicates that the programmer grew up
with certain broken MS-DOS compilers (e.g. early versions of Borland
C) which used that header. Such compilers haven't been in widespread
use for at least a decade, although some compilers may support the use
of <malloc.h> for backward compatibility.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list