Debian Codegraph @

upstream/debian-unstable/man3/memset.3

raw
1 '\" t
2 .\" Copyright 1993, David Metcalfe <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH memset 3 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 memset \- fill memory with a constant byte
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ,\~ \-lc )
13 .SH SYNOPSIS
14 .nf
15 .B #include <string.h>
16 .P
17 .BR "void *memset(" "size_t n;"
18 .BI " void " s [ n "], int " c ", size_t " n );
19 .fi
20 .SH DESCRIPTION
21 The
22 .BR memset ()
23 function fills the first
24 .I n
25 bytes of the
26 memory area pointed to by
27 .I s
28 with the constant byte
29 .IR c .
30 .SH RETURN VALUE
31 The
32 .BR memset ()
33 function returns a pointer to the memory area
34 .IR s .
35 .SH ATTRIBUTES
36 For an explanation of the terms used in this section, see
37 .BR attributes (7).
38 .TS
39 allbox;
40 lbx lb lb
41 l l l.
42 Interface Attribute Value
43 T{
44 .na
45 .nh
46 .BR memset ()
47 T} Thread safety MT-Safe
48 .TE
49 .SH STANDARDS
50 C11, POSIX.1-2008.
51 .SH HISTORY
52 POSIX.1-2001, C89, SVr4, 4.3BSD.
53 .SH SEE ALSO
54 .BR bstring (3),
55 .BR bzero (3),
56 .BR swab (3),
57 .BR wmemset (3)