From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 355D73857828; Mon, 8 Mar 2021 22:30:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 355D73857828 From: "adriaan.jacobs7 at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug manual/27547] New: "Summary of malloc-Related Functions" shows wrong argument order for `aligned_alloc` and `memalign` Date: Mon, 08 Mar 2021 22:30:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: manual X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: adriaan.jacobs7 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2021 22:30:04 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27547 Bug ID: 27547 Summary: "Summary of malloc-Related Functions" shows wrong argument order for `aligned_alloc` and `memalign` Product: glibc Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: manual Assignee: unassigned at sourceware dot org Reporter: adriaan.jacobs7 at gmail dot com CC: mtk.manpages at gmail dot com Target Milestone: --- >>From the overview at https://www.gnu.org/software/libc/manual/html_node/Summary-of-Malloc.html: void *aligned_alloc (size_t size, size_t alignment) Allocate a block of size bytes, starting on an address that is a multip= le of alignment. See Aligned Memory Blocks. void *memalign (size_t size, size_t boundary) Allocate a block of size bytes, starting on an address that is a multip= le of boundary. See Aligned Memory Blocks. According to the manpages (https://linux.die.net/man/3/memalign) for these functions, the arguments are the other way around (first boundary/alignment, then size). In the implementation version I checked, the order from the manpages was respected, leading me to believe that this one overview contai= ned a mistake there. It's obviously nothing big since chances are low someone only consults this overview, but I stumbled upon it and would've almost introduced a bug if I hadn't double checked with the manpages. --=20 You are receiving this mail because: You are on the CC list for the bug.=