I assume if it is a precompiled library it won't include the original C source, so there is nothing to see.
After the answer of Antzrhere, I tried the following trick. I downloaded the folder of glibc-2.13 and saved it in the desktop. So, instead of using the precompiled libraries, I used the files that are contained in the glibc-2.13 folder. The program was perfectly compiled and executed. However when I drilled down to the source, with CodeAnalyst, and double-clicked the following instruction:
int *ptr = (int *) malloc(10 * sizeof (int));
it showed me the following instructions:
mov $0x28,%edi bf 28 00 00 00
callq 400470 <malloc@plt> e8 d3 fe ff ff
mov %rax,-0x10(%rbp) 48 89 45 f0
which are not instructions of malloc function but just a call to it. Is there a proper configuration that I should do?
Since you are linking to a shared library, when you call a function which is in the shared library, it will actually call the "Procedure Linkage Table (PLT)" as part of dynamic linking for ELF.
If you want to inspect malloc performance, you should be looking in the glibc module itself. Another way is to compile your program to link statically (--static). In this case, the "malloc" will be part of the executable.