module Sodium::Mprotect
Public Instance Methods
noaccess(ptr)
click to toggle source
# File lib/sodium/mprotect.rb, line 15 def noaccess(ptr) sodium_mprotect_noaccess(ptr) == 0 || raise(MemoryError, "Memory at address=#{ptr.address} is not secured with Sodium.malloc", caller) end
readonly(ptr)
click to toggle source
# File lib/sodium/mprotect.rb, line 19 def readonly(ptr) sodium_mprotect_readonly(ptr) == 0 || raise(MemoryError, "Memory at address=#{ptr.address} is not secured with Sodium.malloc", caller) end
readwrite(ptr)
click to toggle source
# File lib/sodium/mprotect.rb, line 23 def readwrite(ptr) sodium_mprotect_readwrite(ptr) == 0 || raise(MemoryError, "Memory at address=#{ptr.address} is not secured with Sodium.malloc", caller) end