Module hard::mem[][src]

Expand description

Low level memory-management utilities.

You probably don’t want to use these directly, the rest of this crate provides much safer abstractions for interacting with memory.

Functions

Free the memory pointed to by ptr, previously allocated using malloc from this module.

Allocate sufficient hardened memory to store a value of type T, returning a pointer to the start of the allocated memory.

Compare two regions of memory for equality in constant-time.

Zero the memory region pointed to by ptr.

Sets a region of memory allocated with libsodium to be inaccessible.

Sets a region of memory allocated with libsodium to be readable, but not mutable.

Sets a region of memory allocated with libsodium to be readable and writeable.