This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Regarding malloc()


h2005422@bits-pilani.ac.in wrote:

> I am working on garbage collector for c.But i am not able to get the
> definitation of malloc in gcc-4.0.1 package.Please help me to get its
> definitation.

malloc() is part of the standard C library (libc).  This is separate
from gcc, which does not include a C library.  The libc is highly
platform specific, it depends on the operating system you are using. 
For example, on linux it might be glibc, or it might be something else
(uclibc, newlib, etc).  gcc can be used with dozens of different
platforms (Linux, FreeBSD, OpenBSD, Solaris, Irix, HP-UX, MS Windows,
and on and on) and so this separation between compiler and libc is
necessary.  Your question was vague to the point of not even mentioning
what platform you are using, so the best anyone could say would be "look
in your libc."

Brian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]