753 B
753 B
Basic memory operations
The Shelter standard library provide very basic memory operations primitives, defined in shelter/lib/include/std/mem.h and implemented inside shelter/lib/src/std/mem.c:
SH_STATUS sh_mem_compare(const void *a,const void *b,sh_uint64 size): compare two memory regions with the same size. ReturnSH_STATUS_SUCCESSif both regions are equal, orSH_STATUS_MEM_NOT_EQUALif one byte is different.SH_STATUS sh_mem_copy(const void *destination,const void *source,sh_uint64 size): copy one region of memory to another. ReturnSH_STATUS_SUCCESSSH_STATUS sh_mem_set_8(sh_uint8 *ptr,const sh_uint8 byte,sh_uint64 count): set a provided amount of bytes to the value of one provided byte. ReturnSH_STATUS_SUCCESS