kmalloc usage question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux