Misc Fixes around the Mlock pull request

- Fix one incorrectly translated Mlock call
- Add a missing throw of an exception
- posix_malign returns non-zero on error (generally positive), so the IfLt0 checks were broken.