solana_program_memory

Function sol_memmove

Source
pub unsafe fn sol_memmove(dst: *mut u8, src: *mut u8, n: usize)
Expand description

Like C memmove.

§Arguments

  • dst - Destination
  • src - Source
  • n - Number of bytes to copy

§Errors

When executed within a SBF program, the memory regions spanning n bytes from from dst and src must be mapped program memory. If not, the program will abort.

§Safety

The same safety rules apply as in ptr::copy.