Skip to content

MemSet

MemSet

Description

Set memory region to a value.

Parameters

Name Direction Description
dst out Memory region to set.
val in Value to set (converted to unsigned char).
n in Number of bytes to set.

Success

Returns destination pointer.

Failure

Function cannot fail.

Usage example (Cross-references)

Usage examples (Cross-references)
    }
    
    void *MemSet(void *dst, i32 val, size n) {
        if (!dst) {
            LOG_FATAL("Invalid arguments");
        ValidateStr(src);
    
        MemSet(dst, 0, sizeof(Str));
        *dst             = StrInit();
        dst->copy_init   = src->copy_init;
Last updated on