Regarding Placement of malloc()

Brian Dessent brian@dessent.net
Sat Oct 7 23:32:00 GMT 2006


h2005422@bits-pilani.ac.in wrote:

> I am working on Generational garbage collector for c language under linux
> environment and i have write the code for  my malloc which is working
> properly.Now i have to place that malloc file into the gcc-4.0.2 package so
> that when i configure and install this package my program runs with the
> malloc which i have written.Kindly help me to solve this problem.

Have you not read the replies to your other emails?  malloc() is part of
libc, and libc is not a part of gcc.  So you can't "place that file into
the gcc package" because it is not a part of gcc.

If you want your malloc() to be called you either need to patch your
libc to use your patched version of the function or you need to supply
your memory management library as a regular library and ensure that the
application links against it for those functions.  In either case gcc is
not part of the equation because gcc does not include a C library.

Brian



More information about the Gcc-help mailing list