When running the code on a Raspberry Pi the code errors with an error string of "Invalid Argument".
From a bit of Googling and looking at the code it seems that mmap may no longer be supported. Here was the clearest explanation I found: https://stackoverflow.com/questions/22915778/mmap-dev-fb0-fails-with-invalid-argument