HP-UX Reference (11i v2 04/09) - 3 Library Functions A-M (vol 6)
m
malloc(3C) malloc(3C)
Obsolescent Interfaces
memorymap() has been deprecated at HP-UX 11i Version 1 and is now obsolete. The
mallinfo()
function is more useful for malloc statistics.
Compatibility
The only external difference between the old malloc(3X) allocator and the malloc(3C) allocator is that the
old allocator would return a NULL pointer for a request of zero bytes. The malloc (3C) allocator returns a
valid memory address. This is not a concern for most applications.
By default, SBA (Small Block Allocation) is turned on for Itanium-based systems and is turned off for
PA-RISC systems. This was due to performance concerns. Please refer to the EXTERNAL INFLU-
ENCES section of this manpage for details.
SEE ALSO
brk(2), errno(2), thread_safety(5).
STANDARDS CONFORMANCE
malloc(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C
calloc(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C
free(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C
mallinfo(): SVID2, XPG2
mallopt(): SVID2, SVID3, XPG2
realloc(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C
Section 3−−616 Hewlett-Packard Company − 5 − HP-UX 11i Version 2: September 2004