EmbLogic's Blog

difference between malloc() and kmalloc()

Malloc can be called in user space as well as in kernel space.it allocates physically fragmented memory area .It doesnot actually allocate physical memory.Physical memory can be mapped later.

Kmalloc can be called only in kernel space.it allocates physically contiguous memory chunk.
Memory allocated by kmalloc is reserved and locked,which cannot be swapped.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>