RTI Connext Cert C API  Version 2.4.15
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
OSAPI Memory API

Functions

void OSAPI_Memory_copy (void *dest, const void *src, RTI_SIZE_T size)
 Copies size bytes from memory address source (src) to destination (dest).
void OSAPI_Memory_zero (void *mem, RTI_SIZE_T size)
 Sets memory region (mem) to 0.
RTI_INT32 OSAPI_Memory_compare (const void *left, const void *right, RTI_SIZE_T size)
 Byte-wise comparison of two memory regions.
void OSAPI_Memory_move (void *dest, const void *source, RTI_SIZE_T size)
 Moves size bytes from non-overlapping source to destination (dest).
void * OSAPI_Memory_fndchr (const void *s, RTI_INT32 c, RTI_SIZE_T n)
 Locate byte in byte string.

Detailed Description


Function Documentation

void OSAPI_Memory_copy ( void *  dest,
const void *  src,
RTI_SIZE_T  size 
)

Copies size bytes from memory address source (src) to destination (dest).

Valid destination and source memory regions must be >= size, where size >= 0. Additionally, the source and destination memory regions must not overlap, or the results will be undetermined. On success, the value of the first size bytes in the destination and source regions will be identical.

Parameters:
dest<<out>> Pointer to the destination memory region.
src<<in>> Pointer to the source memory region.
size<<in>> Number of bytes to copy, starting at the destination.
Exceptions:
None.
MT Safety:
The source region cannot be modified concurrently and the destination region cannot be modified or read concurrently.
void OSAPI_Memory_zero ( void *  mem,
RTI_SIZE_T  size 
)

Sets memory region (mem) to 0.

Clear a memory region. Valid memory >= size, where size >= 0. On success, the memory region is filled with 0.

Parameters:
mem<<out>> Pointer to the memory region to be modified.
size<<in>> Number of bytes to fill with zeroes, starting at mem.
Exceptions:
None.
MT Safety:
The memory region cannot be modified or read concurrently.
RTI_INT32 OSAPI_Memory_compare ( const void *  left,
const void *  right,
RTI_SIZE_T  size 
)

Byte-wise comparison of two memory regions.

This function performs a byte-wise comparison of two memory regions (of size bytes). The left and right parameters must be >= 0 and size >= 0. This function does not alter any memory content.

Parameters:
left<<in>> Pointer to logical "left" side of the inequality test.
right<<in>> Pointer to logical "right" side of the inequality test.
size<<in>> Number of bytes to compare, starting from left to right.
Returns:
Less than, equal to, or greater than 0, according to whether left is lexicographically less than, equal to, or greater than right when taken as unsigned characters.
void OSAPI_Memory_move ( void *  dest,
const void *  source,
RTI_SIZE_T  size 
)

Moves size bytes from non-overlapping source to destination (dest).

Copy size bytes from the source to the destination. Valid destination and source regions must be >= size, where size >= 0. The source and destination memory regions may overlap. On return, size number of bytes from source has been copied to the destination region and is identical to the source region.

Parameters:
dest<<out>> Pointer to the destination memory region.
source<<in>> Pointer to the source memory region.
size<<in>> Number of bytes to copy from the source to the destination.
Exceptions:
None.
MT Safety:
The source cannot be modified concurrently; dest cannot be modified or read concurrently.
void* OSAPI_Memory_fndchr ( const void *  s,
RTI_INT32  c,
RTI_SIZE_T  n 
)

Locate byte in byte string.

Locate byte in byte string.

Parameters:
s<<in>> Pointer to beginning of byte string.
c<<in>> Byte to search for.
n<<in>> Maximum search length.
Returns:
Pointer to first occurrence of c if found, NULL otherwise.

RTI Connext Cert C API Version 2.4.15 Copyright © Tue Jan 21 2025 Real-Time Innovations, Inc