From: Glynn Clements <glynn.clements@virgin.net>
To: "Joseph D. Wagner" <wagnerjd@prodigy.net>
Cc: Linux C Programming <linux-c-programming@vger.kernel.org>,
Linux Newbie <linux-newbie@vger.kernel.org>
Subject: Re: How does malloc tell the kernel to allocate more memory?
Date: Sun, 8 Dec 2002 21:20:52 +0000 [thread overview]
Message-ID: <15859.47028.420364.128585@cerise.nosuchdomain.co.uk> (raw)
In-Reply-To: <000301c29eea$3107dd10$032a1c43@joe>
Joseph D. Wagner wrote:
> I'm trying to write a tracer on memory allocation, and I'm having a little
> trouble figuring this out.
>
> At some point, malloc has to call the kernel to tell it to allocate more
> memory for this user process, right? I can't figure out which function
> malloc calls, or where in the code (line number) it's called.
malloc can use either sbrk/brk or (anonymous) mmap to obtain more
memory from the kernel.
> I'm looking at glib-2.3.1 to try and find my answers. After all, that's
> where malloc is defined, right?
It's in glibc (GNU libc), not glib (the GNOME utility library).
--
Glynn Clements <glynn.clements@virgin.net>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next prev parent reply other threads:[~2002-12-08 21:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-08 18:46 How does malloc tell the kernel to allocate more memory? Joseph D. Wagner
2002-12-08 19:29 ` Boris Bezlaj
2002-12-08 19:42 ` Ibraheem Umaru-Mohammed
2002-12-08 21:20 ` Glynn Clements [this message]
2002-12-09 0:34 ` How does malloc tell the kernel to allocate more memory? -- CORRECTION Joseph D. Wagner
2002-12-09 6:55 ` How does malloc tell the kernel to allocate more memory? Heinrich du Toit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15859.47028.420364.128585@cerise.nosuchdomain.co.uk \
--to=glynn.clements@virgin.net \
--cc=linux-c-programming@vger.kernel.org \
--cc=linux-newbie@vger.kernel.org \
--cc=wagnerjd@prodigy.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).