An updated attempt at the mmap override patch that I previously sent. This version properly uses a signed type for the mmap wrapper (as off_t/off64_t are signed types), fixes a few things with the munmap wrapper relating to truncated and sliced file_views, and implements a mremap wrapper for Linux.
There's some debugging stuff left in the mremap wrapper since I have yet to catch anything that uses it, particularly using ERR instead of TRACE and an explicit abort() call so it isn't missed. There's also a %lld formatter in the mmap wrapper that will be fixed later.
I'd be interested to hear how well it does or doesn't work, as well as any comments or critiques on the code.