3 .\" Manual for memory alignment
5 .\" (c) 2009, 2024 Straylight/Edgeware
8 .\"----- Licensing notice ---------------------------------------------------
10 .\" This file is part of the mLib utilities library.
12 .\" mLib is free software: you can redistribute it and/or modify it under
13 .\" the terms of the GNU Library General Public License as published by
14 .\" the Free Software Foundation; either version 2 of the License, or (at
15 .\" your option) any later version.
17 .\" mLib is distributed in the hope that it will be useful, but WITHOUT
18 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
20 .\" License for more details.
22 .\" You should have received a copy of the GNU Library General Public
23 .\" License along with mLib. If not, write to the Free Software
24 .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
27 .\"--------------------------------------------------------------------------
28 .so ../defs.man \" @@@PRE@@@
30 .\"--------------------------------------------------------------------------
31 .TH align 3mLib "4 January 2009" "Straylight/Edgeware" "mLib utilities library"
34 .\"--------------------------------------------------------------------------
36 align \- alignment utilities
38 .\"--------------------------------------------------------------------------
42 .B "#include <mLib/align.h>"
44 .BI "size_t ALIGN(size_t " sz ");"
47 .\"--------------------------------------------------------------------------
51 macro returns the value of its argument
53 rounded up to the next multiple of the size of
55 which is defined as a union containing a selection of built-in types.
56 The intent is to write fairly portable memory allocators, which must
57 return correctly-aligned memory.
60 .\"--------------------------------------------------------------------------
65 .\"--------------------------------------------------------------------------
68 Mark Wooding, <mdw@distorted.org.uk>
70 .\"----- That's all, folks --------------------------------------------------