Xil_SMemCpy - Xil_SMemCpy - 2026.1 English - UG643

Standalone Library Documentation: BSP and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2026-06-23
Version
2026.1 English

This is wrapper function to memcpy function. This function takes size of two memory regions to make sure not read from or write to out of bound memory region. Since 0 is valid address, Src and Dest parameter are not checked for NULL.

Copies Len bytes from source memory to destination memory, allows overlapped memory between source and destination

Prototype

s32 Xil_SMemCpy(void *Dest, const u32 DestSize, const void *Src, const u32 SrcSize, const u32 CopyLen);

Parameters

The following table lists the Xil_SMemCpy function arguments.

Table 1. Xil_SMemCpy Arguments
Type Member Description
void * Dest - Pointer to destination memory
const u32 DestSize - Memory available at destination
const void * Src - Pointer to source memory
const u32 SrcSize - Maximum data that can be copied from source
const u32 CopyLen - Number of bytes to be copied

Returns

XST_SUCCESS - Copy is successful XST_INVALID_PARAM - Invalid inputs