Common: Correctly set ptr to null if mmap fails in memory_util

On POSIX systems mmap will return MAP_FAILED ((void*)-1) instead of a null pointer.
Merge pull request #52 from lioncash/memory

Common: Correctly set ptr to null if mmap fails in memory_util