X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/blobdiff_plain/dd3c57bc8cac59e0d657ee665ce462988d27d714..18c831dcd0ae4d660c70ccac69d27ed2a97851be:/utils/align.3?ds=inline diff --git a/utils/align.3 b/utils/align.3 new file mode 100644 index 0000000..9ee2377 --- /dev/null +++ b/utils/align.3 @@ -0,0 +1,26 @@ +.\" -*-nroff-*- +.TH align 3 "4 January 2009" "Straylight/Edgeware" "mLib utilities library" +.SH NAME +align \- alignment utilities +.\" @ALIGN +.SH SYNOPSIS +.nf +.B "#include " + +.BI "size_t ALIGN(size_t " sz ");" +.fi +.SH DESCRIPTION +The +.B ALIGN +macro returns the value of its argument +.I sz +rounded up to the next multiple of the size of +.BR "union align" , +which is defined as a union containing a selection of built-in types. +The intent is to write fairly portable memory allocators, which must +return correctly-aligned memory. +.IR array . +.SH "SEE ALSO" +.BR mLib (3). +.SH "AUTHOR" +Mark Wooding,