1. Kmalloc returns physically contiguous memory whereas malloc returns only virtual contiguous memory.
2. Memory allocated by Kmalloc can't be swapped as it is reserved and locked.
malloc is used in user space.
kmalloc is used in kernel space, vmalloc can also be used here.
kmalloc and vmalloc are allowed in kernel space whereas malloc is allowed in user space.
2. Memory allocated by Kmalloc can't be swapped as it is reserved and locked.
malloc is used in user space.
kmalloc is used in kernel space, vmalloc can also be used here.
kmalloc and vmalloc are allowed in kernel space whereas malloc is allowed in user space.