lkml.org 
[lkml]   [2005]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectkmalloc usage question
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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" 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.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.024 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site