Added mlock/munlock support