Manual: fix order of arguments of memalign and aligned_alloc

Message ID 779c4fcc-5dc9-4bc1-9d68-cbce31a0d8e7@redhat.com
State Committed
Commit c06c8aeb61708249d8eb0b17a676d16771ea640b
Headers
Series Manual: fix order of arguments of memalign and aligned_alloc |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
redhat-pt-bot/TryBot-32bit success Build for i686
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Testing passed

Commit Message

Dennis Brendel Jan. 15, 2024, 8:55 a.m. UTC
  On the summary page the order of the function arguments was reversed, but it is
in correct order in the other places of the manual.

BZ #27547
---
 manual/memory.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Carlos O'Donell Jan. 24, 2024, 4:25 p.m. UTC | #1
On 1/15/24 03:55, Dennis Brendel wrote:
> On the summary page the order of the function arguments was reversed, but it is
> in correct order in the other places of the manual.

LGTM.

Confirmed PDF manual looks correct.

Andreas, May I please push the manual change?

This looks good to me and would correct the API descriptions.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
 
> BZ #27547
> ---
>  manual/memory.texi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/manual/memory.texi b/manual/memory.texi
> index 258fdbd3a0..78b657627f 100644
> --- a/manual/memory.texi
> +++ b/manual/memory.texi
> @@ -1502,7 +1502,7 @@ Space}.
>  Allocate a block of @var{size} bytes, starting on a page boundary.
>  @xref{Aligned Memory Blocks}.
>  
> -@item void *aligned_alloc (size_t @var{size}, size_t @var{alignment})
> +@item void *aligned_alloc (size_t @var{alignment}, size_t @var{size})

OK. This is correct, verified by checking the ISO C standard.

>  Allocate a block of @var{size} bytes, starting on an address that is a
>  multiple of @var{alignment}.  @xref{Aligned Memory Blocks}.
>  
> @@ -1510,7 +1510,7 @@ multiple of @var{alignment}.  @xref{Aligned Memory Blocks}.
>  Allocate a block of @var{size} bytes, starting on an address that is a
>  multiple of @var{alignment}.  @xref{Aligned Memory Blocks}.
>  
> -@item void *memalign (size_t @var{size}, size_t @var{boundary})
> +@item void *memalign (size_t @var{boundary}, size_t @var{size})

OK. This is correct, verified against deployed malloc.h and BSD memalign().

>  Allocate a block of @var{size} bytes, starting on an address that is a
>  multiple of @var{boundary}.  @xref{Aligned Memory Blocks}.
>
  
Andreas K. Huettel Jan. 24, 2024, 4:42 p.m. UTC | #2
Sure & thank you! -a

Am Mittwoch, 24. Januar 2024, 17:25:18 CET schrieb Carlos O'Donell:
> On 1/15/24 03:55, Dennis Brendel wrote:
> > On the summary page the order of the function arguments was reversed, but it is
> > in correct order in the other places of the manual.
> 
> LGTM.
> 
> Confirmed PDF manual looks correct.
> 
> Andreas, May I please push the manual change?
> 
> This looks good to me and would correct the API descriptions.
> 
> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
>  
> > BZ #27547
> > ---
> >  manual/memory.texi | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/manual/memory.texi b/manual/memory.texi
> > index 258fdbd3a0..78b657627f 100644
> > --- a/manual/memory.texi
> > +++ b/manual/memory.texi
> > @@ -1502,7 +1502,7 @@ Space}.
> >  Allocate a block of @var{size} bytes, starting on a page boundary.
> >  @xref{Aligned Memory Blocks}.
> >  
> > -@item void *aligned_alloc (size_t @var{size}, size_t @var{alignment})
> > +@item void *aligned_alloc (size_t @var{alignment}, size_t @var{size})
> 
> OK. This is correct, verified by checking the ISO C standard.
> 
> >  Allocate a block of @var{size} bytes, starting on an address that is a
> >  multiple of @var{alignment}.  @xref{Aligned Memory Blocks}.
> >  
> > @@ -1510,7 +1510,7 @@ multiple of @var{alignment}.  @xref{Aligned Memory Blocks}.
> >  Allocate a block of @var{size} bytes, starting on an address that is a
> >  multiple of @var{alignment}.  @xref{Aligned Memory Blocks}.
> >  
> > -@item void *memalign (size_t @var{size}, size_t @var{boundary})
> > +@item void *memalign (size_t @var{boundary}, size_t @var{size})
> 
> OK. This is correct, verified against deployed malloc.h and BSD memalign().
> 
> >  Allocate a block of @var{size} bytes, starting on an address that is a
> >  multiple of @var{boundary}.  @xref{Aligned Memory Blocks}.
> >  
> 
>
  

Patch

diff --git a/manual/memory.texi b/manual/memory.texi
index 258fdbd3a0..78b657627f 100644
--- a/manual/memory.texi
+++ b/manual/memory.texi
@@ -1502,7 +1502,7 @@  Space}.
 Allocate a block of @var{size} bytes, starting on a page boundary.
 @xref{Aligned Memory Blocks}.
 
-@item void *aligned_alloc (size_t @var{size}, size_t @var{alignment})
+@item void *aligned_alloc (size_t @var{alignment}, size_t @var{size})
 Allocate a block of @var{size} bytes, starting on an address that is a
 multiple of @var{alignment}.  @xref{Aligned Memory Blocks}.
 
@@ -1510,7 +1510,7 @@  multiple of @var{alignment}.  @xref{Aligned Memory Blocks}.
 Allocate a block of @var{size} bytes, starting on an address that is a
 multiple of @var{alignment}.  @xref{Aligned Memory Blocks}.
 
-@item void *memalign (size_t @var{size}, size_t @var{boundary})
+@item void *memalign (size_t @var{boundary}, size_t @var{size})
 Allocate a block of @var{size} bytes, starting on an address that is a
 multiple of @var{boundary}.  @xref{Aligned Memory Blocks}.