Is your goal just to share memory between userland applications and the kernel? Can the kernel allocate the memory? If so, the easiest way to share memory would be to create a device under /dev and have the userland application mmap it.