Gnulib module: malloc-posix
Portability problems fixed by Gnulib:
ENOMEMon some platforms: mingw, MSVC 14.
malloc (n)can succeed even if
PTRDIFF_MAX. Although this behavior is arguably allowed by POSIX it can lead to behavior not defined by POSIX later, so
malloc-posixdoes 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:
NULLon success on some platforms: AIX 7.2.