public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Manual: fix order of arguments of memalign and aligned_alloc
@ 2024-01-15  8:55 Dennis Brendel
  2024-01-24 16:25 ` Carlos O'Donell
  0 siblings, 1 reply; 3+ messages in thread
From: Dennis Brendel @ 2024-01-15  8:55 UTC (permalink / raw)
  To: libc-alpha


[-- Attachment #1.1.1: Type: text/plain, Size: 1297 bytes --]

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(-)

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}.
 
-- 
2.43.0

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3195 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Manual: fix order of arguments of memalign and aligned_alloc
  2024-01-15  8:55 [PATCH] Manual: fix order of arguments of memalign and aligned_alloc Dennis Brendel
@ 2024-01-24 16:25 ` Carlos O'Donell
  2024-01-24 16:42   ` Andreas K. Huettel
  0 siblings, 1 reply; 3+ messages in thread
From: Carlos O'Donell @ 2024-01-24 16:25 UTC (permalink / raw)
  To: Andreas K. Huettel, Dennis Brendel, libc-alpha

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}.
>  

-- 
Cheers,
Carlos.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Manual: fix order of arguments of memalign and aligned_alloc
  2024-01-24 16:25 ` Carlos O'Donell
@ 2024-01-24 16:42   ` Andreas K. Huettel
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas K. Huettel @ 2024-01-24 16:42 UTC (permalink / raw)
  To: Dennis Brendel, libc-alpha, Carlos O'Donell

[-- Attachment #1: Type: text/plain, Size: 2067 bytes --]

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}.
> >  
> 
> 


-- 
Andreas K. Hüttel
dilfridge@gentoo.org
Gentoo Linux developer
(council, toolchain, base-system, perl, libreoffice)

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 981 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-24 16:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-15  8:55 [PATCH] Manual: fix order of arguments of memalign and aligned_alloc Dennis Brendel
2024-01-24 16:25 ` Carlos O'Donell
2024-01-24 16:42   ` Andreas K. Huettel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).