Add osx memory write
Handle chaning permissions for osx memory read
Remove unneeded function decl