]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/memset.3
92764b14520a07d7d53e7f0d2785ebd4bd63f89b
[thirdparty/man-pages.git] / man3 / memset.3
1 '\" t
2 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
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 (faith@cs.unc.edu)
11 .TH memset 3 (date) "Linux man-pages (unreleased)"
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 .PP
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 .ad l
42 .nh
43 .TS
44 allbox;
45 lbx lb lb
46 l l l.
47 Interface Attribute Value
48 T{
49 .BR memset ()
50 T} Thread safety MT-Safe
51 .TE
52 .hy
53 .ad
54 .sp 1
55 .SH STANDARDS
56 C11, POSIX.1-2008.
57 .SH HISTORY
58 POSIX.1-2001, C89, SVr4, 4.3BSD.
59 .SH SEE ALSO
60 .BR bstring (3),
61 .BR bzero (3),
62 .BR swab (3),
63 .BR wmemset (3)