Skip to main content

Mojo module

memory

Defines functions for memory manipulations.

You can import these APIs from the memory package. For example:

from std.memory import memcmp

Functions

  • destroy_n: Destroy count initialized values at pointer.
  • memcmp: Compares two buffers. Both strings are assumed to be of the same length.
  • memcpy: Copy count * size_of[T]() bytes from src to dest.
  • memmove: Copy count * size_of[T]() bytes from src to dest.
  • memset: Fills memory with the given value.
  • memset_zero: Fills memory with zeros.
  • uninit_copy_n: Copy count values from src into memory at dest.
  • uninit_move_n: Move count values from src into memory at dest.

Was this page helpful?