mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: cranium2003 <cranium2003@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: kmalloc usage question
Date: Sat, 8 Jan 2005 01:17:28 -0800 (PST)	[thread overview]
Message-ID: <20050108091728.315.qmail@web41404.mail.yahoo.com> (raw)

Hello,
     I read kmalloc kernel-api.pdf page and found that


 * %GFP_USER - Allocate memory on behalf of user.  May
sleep.
 *
 * %GFP_KERNEL - Allocate normal kernel ram.  May
sleep.
 *
 * %GFP_ATOMIC - Allocation will not sleep.  Use
inside interrupt handlers.
What i want to know if i write a Device driver that
has kmalloc statements require allocate some string
variable then which flag i should use?
As apis said GFP_USER. But if i want my kernel module
to be require to work in kernel always then can it be
ok to use GFP_KERNEL??
What are then disadvantages to that???
regards,
cranium




		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


                 reply	other threads:[~2005-01-08 10:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20050108091728.315.qmail@web41404.mail.yahoo.com \
    --to=cranium2003@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®