I'm not sure if I should just call mmap() inside themmap only works for user space memory, not for kernel memory.
kernel (any security hazzards or whatnot I should be worried about there?), but
it's going to be a pain to resize arrays.
Most realloc() implimentations grow or shrink in place, if possible. If they can't,The kmalloc implementation is object based, it cannot grow in place. The only approach is call ksize and check if it fits by chance, otherwise alloc new block and memcpy, then free.
or if that wasn't how they were coded, they allocate the new block, memcpy() over,
then free the old block.