view doc/posix-functions/malloc.texi @ 13265:d12a380d8ac1

Mention effects of _POSIX_PTHREAD_SEMANTICS on Solaris.
author Bruno Haible <bruno@clisp.org>
date Sun, 25 Apr 2010 19:50:16 +0200
parents 62fc220f4e95
children ae139af6ca5c
line wrap: on
line source

@node malloc
@section @code{malloc}
@findex malloc

POSIX specification: @url{http://www.opengroup.org/onlinepubs/9699919799/functions/malloc.html}

Gnulib module: malloc-posix

Portability problems fixed by Gnulib:
@itemize
@item
Upon failure, the function does not set @code{errno} to @code{ENOMEM} on
some platforms:
mingw.
@end itemize

Portability problems not fixed by Gnulib:
@itemize
@code{malloc (0)} always returns a NULL pointer on some platforms:
AIX 5.1, OSF/1 5.1.
@end itemize

Extension: Gnulib provides a module @samp{malloc} that substitutes a
@code{malloc} implementation that behaves more like the glibc implementation,
regarding the result of @code{malloc (0)}.