From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11663 invoked by alias); 4 Oct 2006 19:59:34 -0000 Received: (qmail 11651 invoked by uid 22791); 4 Oct 2006 19:59:33 -0000 X-Spam-Check-By: sourceware.org Received: from dessent.net (HELO dessent.net) (69.60.119.225) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 04 Oct 2006 19:59:31 +0000 Received: from localhost ([127.0.0.1] helo=dessent.net) by dessent.net with esmtp (Exim 4.61) (envelope-from ) id 1GVCtq-0003G3-4f; Wed, 04 Oct 2006 19:59:26 +0000 Message-ID: <4524129E.37A32296@dessent.net> Date: Wed, 04 Oct 2006 19:59:00 -0000 From: Brian Dessent Reply-To: gcc-help@gcc.gnu.org X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: h2005422@bits-pilani.ac.in CC: gcc-help@gcc.gnu.org Subject: Re: Regarding malloc() References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-10/txt/msg00027.txt.bz2 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