1 .\" Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
3 .\" @APPLE_LICENSE_HEADER_START@
5 .\" The contents of this file constitute Original Code as defined in and
6 .\" are subject to the Apple Public Source License Version 1.1 (the
7 .\" "License"). You may not use this file except in compliance with the
8 .\" License. Please obtain a copy of the License at
9 .\" http://www.apple.com/publicsource and read it before using this file.
11 .\" This Original Code and all software distributed under the License are
12 .\" distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
13 .\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
14 .\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
15 .\" FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
16 .\" License for the specific language governing rights and limitations
17 .\" under the License.
19 .\" @APPLE_LICENSE_HEADER_END@
26 .Nd aligned memory allocation
32 .Fa "size_t alignment"
40 bytes of memory such that the allocation's base address is an exact multiple of
42 and returns the allocation in the value pointed to by
47 must be a power of 2 at least as large as
50 Memory that is allocated via
52 can be used as an argument in subsequent calls to
57 (Note however, that the allocation returned by
61 is not guaranteed to preserve the original
65 should be used judiciously as the algorithm that realizes the
67 constraint can incur significant memory overhead.
71 function returns the value 0 if successful; otherwise it returns an error value.
75 function will fail if:
80 parameter is not a power of 2 at least as large as
83 Memory allocation error.
91 .Xr malloc_zone_memalign 3