malloc
======

POSIX specification:
 https://pubs.opengroup.org/onlinepubs/9699919799/functions/malloc.html

Gnulib module: malloc-posix

Portability problems fixed by Gnulib:

  * Upon failure, the function does not set errno to ENOMEM on some platforms: mingw, MSVC 14.

  * On some platforms, malloc (n) can succeed even if n exceeds PTRDIFF_MAX.  Although this behavior is arguably allowed by POSIX it can lead to behavior not defined by POSIX later, so malloc-posix does not allow going over the limit.

Extension: Gnulib provides a module malloc-gnu that substitutes a malloc implementation that behaves more like the glibc implementation, by fixing this portability problem:

  * malloc (0) returns NULL on success on some platforms: AIX 7.2.