public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Regarding malloc()
@ 2006-10-04 19:39 h2005422
  2006-10-04 19:49 ` Amit Choudhary
  2006-10-04 19:59 ` Brian Dessent
  0 siblings, 2 replies; 6+ messages in thread
From: h2005422 @ 2006-10-04 19:39 UTC (permalink / raw)
  To: gcc-help

Respected sir:
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.


Thank you
Amit Prakash

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Regarding malloc()
  2006-10-04 19:39 Regarding malloc() h2005422
@ 2006-10-04 19:49 ` Amit Choudhary
  2006-10-04 19:59 ` Brian Dessent
  1 sibling, 0 replies; 6+ messages in thread
From: Amit Choudhary @ 2006-10-04 19:49 UTC (permalink / raw)
  To: h2005422, gcc-help


Can you please explain your problem in a little detail. Is compilation/linking failing?

Regards,
Amit Choudhary

--- h2005422@bits-pilani.ac.in wrote:

> Respected sir:
> 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.
> 
> 
> Thank you
> Amit Prakash
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Regarding malloc()
  2006-10-04 19:39 Regarding malloc() h2005422
  2006-10-04 19:49 ` Amit Choudhary
@ 2006-10-04 19:59 ` Brian Dessent
  1 sibling, 0 replies; 6+ messages in thread
From: Brian Dessent @ 2006-10-04 19:59 UTC (permalink / raw)
  To: h2005422; +Cc: gcc-help

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Regarding malloc()
  2006-10-05  8:25 h2005422
@ 2006-10-05 12:59 ` Michael Eager
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Eager @ 2006-10-05 12:59 UTC (permalink / raw)
  To: h2005422; +Cc: gcc-help

h2005422@bits-pilani.ac.in wrote:
> Respected sir:
> Thank for your reply.As i am working on generational garbage collector for
> c language.I want to partition the heap into three generation and than i
> want the malloc function such that it allocate the data object with in the
> range in which i want.For that i have to write my malloc fuction.So i want
> the real behaviour of malloc function.Kindly help me out to make partition
> with in the heap than modify the malloc function for the specific range.

Malloc is part of libc.  On Linux, this is glibc.
Another implementation of malloc can be found in newlib.
A quick search will give you locations where you can
download the sources for either.

Please put spaces between sentences.  Also feel free to put
spaces between paragraphs, as appropriate.

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Regarding malloc()
@ 2006-10-05  8:25 h2005422
  2006-10-05 12:59 ` Michael Eager
  0 siblings, 1 reply; 6+ messages in thread
From: h2005422 @ 2006-10-05  8:25 UTC (permalink / raw)
  To: gcc-help

Respected sir:
Thank for your reply.As i am working on generational garbage collector for
c language.I want to partition the heap into three generation and than i
want the malloc function such that it allocate the data object with in the
range in which i want.For that i have to write my malloc fuction.So i want
the real behaviour of malloc function.Kindly help me out to make partition
with in the heap than modify the malloc function for the specific range.
Thank You
Amit Prakash

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Regarding malloc()
@ 2006-10-04 22:53 Bill McEnaney
  0 siblings, 0 replies; 6+ messages in thread
From: Bill McEnaney @ 2006-10-04 22:53 UTC (permalink / raw)
  To: Amit Choudhary, h2005422, gcc-help

Amit,

Do you want the malloc() function's source code or the name of the
header file that you include in programs that use malloc(), or do you
want something else?

Bill

> 
> Can you please explain your problem in a little detail. Is
compilation/linking failing?
> 
> Regards,
> Amit Choudhary
> 
> --- h2005422@bits-pilani.ac.in wrote:
> 
> > Respected sir:
> > 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.
> > 
> > 
> > Thank you
> > Amit Prakash
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> 

________________________________________________________________
"Pro-choice?"  Then click here.
http://cathinsight.com/morality/saying.htm

"In My Egotistical Opinion, most people's C programs should be indented
six feet downward and covered with dirt."    — Blair P. Houghton 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-10-05 12:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-04 19:39 Regarding malloc() h2005422
2006-10-04 19:49 ` Amit Choudhary
2006-10-04 19:59 ` Brian Dessent
2006-10-04 22:53 Bill McEnaney
2006-10-05  8:25 h2005422
2006-10-05 12:59 ` Michael Eager

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).