]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/memmove.3
db49340bd67151941302c224d9e1ce66aee4cacf
[thirdparty/man-pages.git] / man3 / memmove.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .\" References consulted:
6 .\" Linux libc source code
7 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
8 .\" 386BSD man pages
9 .\" Modified Sat Jul 24 18:49:59 1993 by Rik Faith (faith@cs.unc.edu)
10 .TH MEMMOVE 3 2021-03-22 "Linux man-pages (unreleased)" "Linux Programmer's Manual"
11 .SH NAME
12 memmove \- copy memory area
13 .SH LIBRARY
14 Standard C library
15 .RI ( libc ", " \-lc )
16 .SH SYNOPSIS
17 .nf
18 .B #include <string.h>
19 .PP
20 .BI "void *memmove(void *" dest ", const void *" src ", size_t " n );
21 .fi
22 .SH DESCRIPTION
23 The
24 .BR memmove ()
25 function copies
26 .I n
27 bytes from memory area
28 .I src
29 to memory area
30 .IR dest .
31 The memory areas may overlap: copying takes place as though
32 the bytes in
33 .I src
34 are first copied into a temporary array that does not overlap
35 .I src
36 or
37 .IR dest ,
38 and the bytes are then copied from the temporary array to
39 .IR dest .
40 .SH RETURN VALUE
41 The
42 .BR memmove ()
43 function returns a pointer to
44 .IR dest .
45 .SH ATTRIBUTES
46 For an explanation of the terms used in this section, see
47 .BR attributes (7).
48 .ad l
49 .nh
50 .TS
51 allbox;
52 lbx lb lb
53 l l l.
54 Interface Attribute Value
55 T{
56 .BR memmove ()
57 T} Thread safety MT-Safe
58 .TE
59 .hy
60 .ad
61 .sp 1
62 .SH STANDARDS
63 POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
64 .SH SEE ALSO
65 .BR bcopy (3),
66 .BR bstring (3),
67 .BR memccpy (3),
68 .BR memcpy (3),
69 .BR strcpy (3),
70 .BR strncpy (3),
71 .BR wmemmove (3)