Re: what is the difference between kmalloc and vmalloc?

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

 



On Thu, Nov 22, 2012 at 9:39 AM, Mulyadi Santosa
<mulyadi.santosa@xxxxxxxxx> wrote:
> On Thu, Nov 22, 2012 at 10:12 AM, horse_rivers <horse_rivers@xxxxxxx> 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. Example of such usage is for allocating memory to load
> kernel module.

Is it necessary that vmalloc always allocate virtually contiguous
memory and not physically contiguous?
Except large size memory allocation why one needs to use vmalloc? Can
we say that use kmalloc and  if it fails retry with kmalloc?

regards
Vijay

>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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


[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