diff options
Diffstat (limited to 'src/lib/libc/stdlib/posix_memalign.3')
-rw-r--r-- | src/lib/libc/stdlib/posix_memalign.3 | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/src/lib/libc/stdlib/posix_memalign.3 b/src/lib/libc/stdlib/posix_memalign.3 deleted file mode 100644 index fcd0a4cbdb..0000000000 --- a/src/lib/libc/stdlib/posix_memalign.3 +++ /dev/null | |||
@@ -1,97 +0,0 @@ | |||
1 | .\" $OpenBSD: posix_memalign.3,v 1.4 2017/05/13 07:11:29 otto Exp $ | ||
2 | .\" Copyright (C) 2006 Jason Evans <jasone@FreeBSD.org>. | ||
3 | .\" All rights reserved. | ||
4 | .\" | ||
5 | .\" Redistribution and use in source and binary forms, with or without | ||
6 | .\" modification, are permitted provided that the following conditions | ||
7 | .\" are met: | ||
8 | .\" 1. Redistributions of source code must retain the above copyright | ||
9 | .\" notice(s), this list of conditions and the following disclaimer as | ||
10 | .\" the first lines of this file unmodified other than the possible | ||
11 | .\" addition of one or more copyright notices. | ||
12 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
13 | .\" notice(s), this list of conditions and the following disclaimer in | ||
14 | .\" the documentation and/or other materials provided with the | ||
15 | .\" distribution. | ||
16 | .\" | ||
17 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY | ||
18 | .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
19 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
20 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE | ||
21 | .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
22 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
23 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | ||
24 | .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
25 | .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | ||
26 | .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
27 | .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
28 | .\" | ||
29 | .\" $FreeBSD: src/lib/libc/stdlib/posix_memalign.3,v 1.3 2007/03/28 04:32:51 jasone Exp $ | ||
30 | .\" | ||
31 | .Dd $Mdocdate: May 13 2017 $ | ||
32 | .Dt POSIX_MEMALIGN 3 | ||
33 | .Os | ||
34 | .Sh NAME | ||
35 | .Nm posix_memalign | ||
36 | .Nd aligned memory allocation | ||
37 | .Sh SYNOPSIS | ||
38 | .In stdlib.h | ||
39 | .Ft int | ||
40 | .Fn posix_memalign "void **ptr" "size_t alignment" "size_t size" | ||
41 | .Sh DESCRIPTION | ||
42 | The | ||
43 | .Fn posix_memalign | ||
44 | function allocates | ||
45 | .Fa size | ||
46 | bytes of memory such that the allocation's base address is a multiple of | ||
47 | .Fa alignment , | ||
48 | and returns the allocation in the value pointed to by | ||
49 | .Fa ptr . | ||
50 | .Pp | ||
51 | The requested | ||
52 | .Fa alignment | ||
53 | must be a power of 2 at least as large as | ||
54 | .Fn sizeof "void *" . | ||
55 | .Pp | ||
56 | Memory that is allocated via | ||
57 | .Fn posix_memalign | ||
58 | can be used as an argument in subsequent calls to | ||
59 | .Xr realloc 3 , | ||
60 | .Xr reallocarray 3 | ||
61 | and | ||
62 | .Xr free 3 , | ||
63 | but not | ||
64 | .Xr recallocarray 3 | ||
65 | and | ||
66 | .Xr freezero 3 . | ||
67 | .Sh RETURN VALUES | ||
68 | The | ||
69 | .Fn posix_memalign | ||
70 | function returns the value 0 if successful; otherwise it returns an error value. | ||
71 | .Sh ERRORS | ||
72 | The | ||
73 | .Fn posix_memalign | ||
74 | function will fail if: | ||
75 | .Bl -tag -width Er | ||
76 | .It Bq Er EINVAL | ||
77 | The | ||
78 | .Fa alignment | ||
79 | parameter is not a power of 2 at least as large as | ||
80 | .Fn sizeof "void *" . | ||
81 | .It Bq Er ENOMEM | ||
82 | Memory allocation error. | ||
83 | .El | ||
84 | .Sh SEE ALSO | ||
85 | .Xr free 3 , | ||
86 | .Xr malloc 3 , | ||
87 | .Xr realloc 3 | ||
88 | .Sh STANDARDS | ||
89 | The | ||
90 | .Fn posix_memalign | ||
91 | function conforms to | ||
92 | .St -p1003.1-2001 . | ||
93 | .Sh HISTORY | ||
94 | The | ||
95 | .Fn posix_memalign | ||
96 | function first appeared in | ||
97 | .Ox 4.8 . | ||