From 1aa2c40e615d160557581cbfea5a649f35732958 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 18 Oct 2015 04:31:32 +0200 Subject: info: unaligned pointers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- doc/info/chap/memory-allocation.texinfo | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/info/chap') diff --git a/doc/info/chap/memory-allocation.texinfo b/doc/info/chap/memory-allocation.texinfo index cc88dcf..b88a4b8 100644 --- a/doc/info/chap/memory-allocation.texinfo +++ b/doc/info/chap/memory-allocation.texinfo @@ -399,7 +399,9 @@ suitable aligment for any pointer type. @code{malloc}, even before C11, uses its size for the aligment of all pointers it returns. @code{malloc(n)} is hence equivalent to -@code{aligned_alloc(sizeof(max_align_t), n)}. +@code{memalign(sizeof(max_align_t), n)}. If +you want the pointer to be unaligned, call +@code{memalign(1, n)}. @item void* calloc(size_t count, size_t size) @fnindex calloc -- cgit v1.2.3-70-g09d2