struggling with mmap pointer arithmetic