malloc(3) is just a hint that malloc is part of section 3 of the manual pages. Section 3 are library functions. This contradicts Section 2 of the man page where system calls are indicated. No malloc(2) .
For instance:
fwrite is a library function that is sometimes written as fwrite(3)
write is syscall, which is sometimes written as write(2)
If you run the command:
$ man man
he will tell you
1 Executable programs or shell commands 2 System calls (functions provided by the kernel) 3 Library calls (functions within program libraries) 4 Special files (usually found in /dev) 5 File formats and conventions eg /etc/passwd 6 Games 7 Miscellaneous (including macro packages and convenรข tions), eg man(7), groff(7) 8 System administration commands (usually only for root) 9 Kernel routines [Non standard]
source share