From: Heinrich du Toit <hdutoit@tlabs.ac.za>
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: Mon, 09 Dec 2002 08:55:27 +0200 [thread overview]
Message-ID: <3DF43E5F.8050707@tlabs.ac.za> (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.
>
>I'm looking at glib-2.3.1 to try and find my answers. After all, that's
>where malloc is defined, right?
>
>TIA.
>
>Joseph Wagner
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
I don't have the answer. But look at something that already does this.
electric-fence detects illegal memory access (great for debugging)
ccmalloc is also a memory debugging library. It detects memory leaks and
stuff like that.
Maybe after you checked this out you can rather work on improving these
library's or extending them to do exactly what you want rather than
reinventing the weel :-)
Good luck
-Heinrich
-
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
prev parent reply other threads:[~2002-12-09 6:55 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
2002-12-09 0:34 ` How does malloc tell the kernel to allocate more memory? -- CORRECTION Joseph D. Wagner
2002-12-09 6:55 ` Heinrich du Toit [this message]
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=3DF43E5F.8050707@tlabs.ac.za \
--to=hdutoit@tlabs.ac.za \
--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).