marcel_os::memory

Function memcpy

Source
#[no_mangle]
pub extern "C" fn memcpy(
    dest: *mut u8,
    src: *const u8,
    num: usize,
) -> *mut u8
Expand description

Copies a block of memory from one location to another.

This function copies num bytes from the source pointer src to the destination pointer dest.

§Arguments

  • dest - A pointer to the destination memory block.
  • src - A pointer to the source memory block.
  • num - The number of bytes to copy.

§Returns

The original destination pointer dest.

§Safety

This function is unsafe because it operates directly on raw pointers.