Changed an mmap call to check for MAP_FAILED instead of NULL
solved the segfault caused my repeated registrations, thanks to @crawford for pointing out the error in my pointer arithmetic