Re: what is the difference between kmalloc and vmalloc?

2012-11-26 Thread Mulyadi Santosa
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

Re: what is the difference between kmalloc and vmalloc?

2012-11-25 Thread Vijay Chauhan
On Thu, Nov 22, 2012 at 9:39 AM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: On Thu, Nov 22, 2012 at 10:12 AM, horse_rivers horse_riv...@126.com wrote: thanks! kmalloc allocates memory from slab cache. It tends to be physically contigous and you can get memory size smaller than page

what is the difference between kmalloc and vmalloc?

2012-11-21 Thread horse_rivers
thanks! ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: what is the difference between kmalloc and vmalloc?

2012-11-21 Thread Mulyadi Santosa
On Thu, Nov 22, 2012 at 10:12 AM, horse_rivers horse_riv...@126.com wrote: thanks! kmalloc allocates memory from slab cache. It tends to be physically contigous and you can get memory size smaller than page size. vmalloc, on the other hand, is when you need only virtually contigous memory area.

Re: what is the difference between kmalloc and vmalloc?

2012-11-21 Thread Vivek Dasgupta
kmalloc allocates physically contiguous memory, while vmalloc allocates memory which is only virtually contiguous and not necessarily physically contiguous. Usually physically contiguous memory is required for hardware devices (dma etc) , thus kmalloc is useful for allocating such memory. And