diff --git a/manual/memory.texi b/manual/memory.texi index 0b2b9c8795..9e407cd44a 100644 --- a/manual/memory.texi +++ b/manual/memory.texi @@ -994,8 +994,8 @@ power of two than that, use @code{aligned_alloc} or @code{posix_memalign}. @safety{@prelim{}@mtsafe{}@asunsafe{@asulock{}}@acunsafe{@aculock{} @acsfd{} @acsmem{}}} @c Alias to memalign. The @code{aligned_alloc} function allocates a block of @var{size} bytes whose -address is a multiple of @var{alignment}. The @var{alignment} must be a -power of two and @var{size} must be a multiple of @var{alignment}. +address is a multiple of @var{adjusted-alignment}. The value of @var{adjusted-alignment} +is the smallest power of two that's greater than or equal to @var{alignment}. The @code{aligned_alloc} function returns a null pointer on error and sets @code{errno} to one of the following values: @@ -1005,7 +1005,7 @@ The @code{aligned_alloc} function returns a null pointer on error and sets There was insufficient memory available to satisfy the request. @item EINVAL -@var{alignment} is not a power of two. +The value of @var{alignment} is greater than @code{SIZE_MAX / 2 + 1}. This function was introduced in @w{ISO C11} and hence may have better portability to modern non-POSIX systems than @code{posix_memalign}.