1MEMSET(3) Linux Programmer's Manual MEMSET(3)
2
3
4
6 memset - fill memory with a constant byte
7
9 #include <string.h>
10
11 void *memset(void *s, int c, size_t n);
12
14 The memset() function fills the first n bytes of the memory area
15 pointed to by s with the constant byte c.
16
18 The memset() function returns a pointer to the memory area s.
19
21 For an explanation of the terms used in this section, see at‐
22 tributes(7).
23
24 ┌────────────────────────────────────────────┬───────────────┬─────────┐
25 │Interface │ Attribute │ Value │
26 ├────────────────────────────────────────────┼───────────────┼─────────┤
27 │memset() │ Thread safety │ MT-Safe │
28 └────────────────────────────────────────────┴───────────────┴─────────┘
29
31 POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
32
34 bstring(3), bzero(3), swab(3), wmemset(3)
35
37 This page is part of release 5.13 of the Linux man-pages project. A
38 description of the project, information about reporting bugs, and the
39 latest version of this page, can be found at
40 https://www.kernel.org/doc/man-pages/.
41
42
43
44GNU 2021-03-22 MEMSET(3)