8 .Nd memset of a multi-byte pattern
14 .Fn memset_pattern4 "void *b" "const void *pattern4" "size_t len"
16 .Fn memset_pattern8 "void *b" "const void *pattern8" "size_t len"
18 .Fn memset_pattern16 "void *b" "const void *pattern16" "size_t len"
20 These are analogous to
23 fill memory with a replicated pattern either 4, 8, or 16 bytes long.
25 points to a buffer of size
27 bytes which is to be filled. The second parameter points to the pattern.
28 If the buffer length is not an even multiple
29 of the pattern length, the last instance of the pattern will be truncated.
30 Neither the buffer nor the pattern pointer need be aligned.
32 The following example:
33 .Bd -literal -offset indent
36 memset_pattern4( buf, "1234", sizeof(buf) );
39 will set the buffer to the value "1234123412".
43 These functions first appeared in Mac OS 10.5.