Originally Posted by supravat
$ man malloc
but it shows no manual entry.
Hopefully you knew that should be in section (3) of man pages.
So if someone hadn't told you the right answer:
Originally Posted by paulsm4
"apt-get install manpages-dev"
you could have found it yourself. You should know at least that the file you want has malloc.3 in its name, so you would want to know which Ubuntu package includes that file. A great place to answer such questions is:
Scroll down to "Search the contents of packages" then enter the partial name malloc.3 in the box, then click the button that says "packages that contain files whose names contain the keyword". Then press search. Then look down the long list of such files that it provides for the one that looks most plausible for your purposes, which is pretty obviously /usr/share/man/man3/malloc.3.gz
and look beside it for the package name, which PSM already told you this time. But sometimes you'll want to find such things faster yourself.
For other C/C++ functions, I often find the man pages don't give the information I need. One of the several resources better than the man pages that I use is
Notice the Search box at the type. Type in the name of a C or C++ function and press search and it will take you to documentation on that function.