Risk-Aware Code Review: Auto Approve Low-Risk Changes
LiveReview LiveReview LiveReview - Free, Risk-Aware Code Review: Auto Approve Low-Risk Changes | Product Hunt LiveReview - Free, Risk-Aware Code Review: Auto Approve Low-Risk Changes | Product Hunt GitHub Install Now

We'd appreciate a star

memfill - fill memory area with pattern

Author

       Lars Wirzenius (lars.wirzenius@helsinki.fi)

Publib                                        C Programmer's Manual                                MEMFILL(3pub)

Description

memfill  copies  consecutive  bytes  from  the  pattern  pat to consecutive bytes in the memory area buf,
       wrapping around in pat when its end is reached.  patsize is the size of the pattern, size is the size  of
       the memory area.  The pattern and the memory area must not be overlapping.

Example

       To initialize an integer array one might do the following.

            int temp, array[1024];

            temp = 1234;
            memfill(array, sizeof(array), &temp, sizeof(temp));

Name

       memfill - fill memory area with pattern

Return Value

memfill returns its first argument.

See Also

publib(3)

Synopsis

       #include <publib.h>
       void *memfill(void *buf, size_t size, const void *pat, size_t patsize);

See Also