Debian Codegraph @

upstream/debian-trixie/man3/memset.3

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