how to use the memory allocated in kernel?
Javier Martinez Canillas
martinez.javier at gmail.com
Wed Apr 18 06:26:42 EDT 2012
2012/4/18 夏业添 <summerxyt at gmail.com>:
> Hi Dave,
>
> Thanks for reply. My English is not very good, and so I want to ask about a
> term:map. Does map mean that create a relationship between the virtual space
> and physical memory?
>
> Thanks again!
>
As Dave said, unless you know what you are doing, you should really
use kmalloc() and friends (kzalloc(), etc) for assigning physically
contiguous kernel memory or
vmalloc() that assigns virtually (but not necessarily physical)
contiguous memory.
vmalloc() performs worse that kmalloc() but has more changes to
succeed when trying to get large memory chunks.
Best regards,
--
Javier Martínez Canillas
(+34) 682 39 81 69
Barcelona, Spain
More information about the Kernelnewbies
mailing list