Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidFlag = errors.New("<memguard::memcall> memory protection flag is undefined")
ErrInvalidFlag indicates that a given memory protection flag is undefined.
View Source
var NoAccess = MemoryProtectionFlag{1}
NoAccess specifies that the memory should be marked unreadable and immutable.
View Source
var ReadOnly = MemoryProtectionFlag{2}
ReadOnly specifies that the memory should be marked read-only (immutable).
View Source
var ReadWrite = MemoryProtectionFlag{6}
ReadWrite specifies that the memory should be made readable and writable.
Functions ¶
func DisableCoreDumps ¶
func DisableCoreDumps() error
DisableCoreDumps disables core dumps on Unix systems.
func Protect ¶
func Protect(b []byte, mpf MemoryProtectionFlag) error
Protect modifies the protection state for a specified byte slice.
Types ¶
type MemoryProtectionFlag ¶ added in v0.16.0
type MemoryProtectionFlag struct {
// contains filtered or unexported fields
}
MemoryProtectionFlag specifies some particular memory protection flag.
Click to show internal directories.
Click to hide internal directories.