Open arthurmco opened 6 years ago
The kernel heap allocator serves to do small allocations, less than the 4kb granularity of the virtual memory manager.
It provides malloc and free-like interfaces. I will use kmalloc and kfree here, for simplicity.
malloc
free
kmalloc
kfree
kmalloc will have three variations
It would allocate virtual memory only from the kernel zone. The user zone would receive 4kb pages directly and the C library would do the same thing.
kfree would free the address allocated by any of these three kmallocs.
It would be the unique interface that drivers should use.. This results in a more portable system
The kernel heap allocator serves to do small allocations, less than the 4kb granularity of the virtual memory manager.
5 and #6 need to be closed. The PMM and the VMM need to be working well. Not bug-free (this is impossible, I think), but bug-free enough.
It provides
malloc
andfree
-like interfaces. I will usekmalloc
andkfree
here, for simplicity.kmalloc
will have three variationsIt would allocate virtual memory only from the kernel zone. The user zone would receive 4kb pages directly and the C library would do the same thing.
kfree
would free the address allocated by any of these threekmalloc
s.It would be the unique interface that drivers should use.. This results in a more portable system