From: Steven Smith <sos22@cam.ac.uk>
To: "Joseph D. Wagner" <wagnerjd@prodigy.net>
Cc: Linux Newbie <linux-newbie@vger.kernel.org>
Subject: Re: INFO REQ: Clarification of Memory Management
Date: Sat, 7 Dec 2002 12:41:47 +0000 [thread overview]
Message-ID: <20021207124147.GA577@cam.ac.uk> (raw)
In-Reply-To: <000101c29d67$f50ce310$670b3941@joe>
[-- Attachment #1: Type: text/plain, Size: 817 bytes --]
> Does the __get_free_pages() function eventually call the kmalloc() function?
> Or does the kmalloc() function eventually call the __get_free_pages()
> function? Or are these two totally separate functions for different
> purposes?
kmalloc() will eventually call get_free_pages(), but you really
shouldn't ever need to know that, unless you're fiddling with the
implementations of either function.
Note that, even though kmalloc() uses get_free_pages() to allocate
memory, it performs various other bookkeeping tasks, and so the two
types of memory allocations really can't be mixed.
> Which of these functions can be called by user process for the purpose of
> allocating memory for that user process?
Neither; use malloc() in userspace. (Or the new operator if you're using
C++)
Steven Smith,
sos22@cam.ac.uk.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2002-12-07 12:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-06 20:42 INFO REQ: Clarification of Memory Management Joseph D. Wagner
2002-12-07 12:41 ` Steven Smith [this message]
2002-12-07 12:58 ` Ken Moffat
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=20021207124147.GA577@cam.ac.uk \
--to=sos22@cam.ac.uk \
--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