Implemented memory allocator in the kernel space.