In: Computer Science
Operating System Management
kmalloc()
Explanation
1.Can be used by regular processes as a faster, lower-level version of malloc
-kmalloc() is not faster. kmalloc() is similar to malloc() but not lower version of malloc()
---------------------------------------------------------------------------------------------------------------------------------------
2.Allocates memory in the kernel with different priorities
-kmalloc() uses flags to set different priorities.
-----------------------------------------------------------------------------------------------------------------------------------------
3.Only accepts allocation requests that are evenly divisible by the page size
-In kmalloc() , allocator is page based. It will round up the requested memory to fit into available memory.
-------------------------------------------------------------------------------------------------------------------------------------
4. Returns the physical address of allocated memory
-kmalloc() will return the virtual address but not physical address. MMU(memory management unit) will translate the virtual address into physical address.
---------------------------------------------------------------------------------------------------------------------------------------