Memory allocated using kmem_alloc() is not paged. Available memory is therefore limited by the total physical memory on the system. It is also limited by the available kernel virtual
address space, which is often the more restrictive constraint on large-memory configurations.
Excessive use of kernel memory is likely to affect overall system performance. Overcommitment of kernel memory will cause the system to hang or panic.
Misuse of the kernel memory allocator, such as writing past the end of a buffer, using a buffer after freeing it, freeing a buffer twice, or freeing a null or invalid pointer, will corrupt the kernel
heap and may cause the system to corrupt data or panic.
The initial contents of memory allocated using kmem_alloc() are random garbage. This random garbage may include secure kernel data. Therefore, uninitialized kernel memory should
be handled carefully. For example, never copyout(9F) a potentially uninitialized buffer.
|