Kernel memory is allocated differently than user memory. It is often allocated from a free memory pool and some kernel memory needs to be contiguous. The buddy system allocates memory from fixed-size segments of physically contiguous pages and satisfies requests by rounding them up to the next highest power of 2, then splitting chunks as needed. The slab allocator uses caches of pre-allocated objects to satisfy requests faster without fragmentation. Linux uses slab allocation, with structs like task_struct allocated from caches.