Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

Copy data octets from one memory buffer to another memory buffer.

Files

lib_mem.h/lib_mem.c

Prototype

Arguments

pdest

Pointer to the destination memory buffer.

psrc

Pointer to the source memory buffer.

size

Number of octets to copy.

Returned Value

None.

Required Configuration

None.

Notes / Warnings

  1. Zero-sized copies allowed.
  2. Memory buffers not checked for overlapping. However, data octets from a source memory buffer at a higher address value should successfully copy to a destination memory buffer at a lower address value even if any octets of the memory buffers overlap as long as no individual copy overlaps. Since Mem_Copy() performs the data octet copy via CPU_ALIGN-sized words and/or octets; and since CPU_ALIGN-sized words must be accessed on word-aligned addresses, neither CPU_ALIGN-sized words nor octets at unique addresses can ever overlap. Therefore, Mem_Copy() should be able to successfully copy overlapping memory buffers as long as the source memory buffer is at a higher address value than the destination memory buffer.
  3. This function can be configured to build an assembly-optimized version.

Example Usage

  • No labels