Hi...

On Mon, Nov 26, 2012 at 1:51 PM, Vijay Chauhan <kernel.vi...@gmail.com> wrote:
> Is it necessary that vmalloc always allocate virtually contiguous
> memory and not physically contiguous?

to the best I know, yes vmalloc allocate virtually contigous.

However, since they manage the pages by fiddling with the page tables,
there is a chance that some of them are physically contigous IMHO

> Except large size memory allocation why one needs to use vmalloc? Can
> we say that use kmalloc and  if it fails retry with kmalloc?

nice question: AFAIK vmalloc() is made to tackle large size memory
allocation, or in other word to side step memory fragmentation issue.

IIRC too, that by using vmalloc, the vmalloc-ed area are guarded by
guard pages on both start and end address. So it's like stack overflow
guard pages. But don't count me on this info. Check it by yourself.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to