Re: allocating memory

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

 



Shah Sultan Alam wrote:
How can I allocate physically contiguous memory in kernel space( for some
device driver)

regds
SSA

If it's a small amount of memory, you shloud use the slab allocator (function kmalloc or kmem_cache_alloc) and if the moemory you want to allocate is bigger (bigger than a page = 4kB), you should use __get_free_pages() for better performance.
have a look at this link to understand the vm of linux :
http://www.csn.ul.ie/~mel/projects/vm/guide/html/understand/node1.html



-- 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