From patchwork Thu Oct 21 09:28:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Scott X-Patchwork-Id: 46481 X-Patchwork-Delegate: dj@redhat.com Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7E3F13857C4C for ; Thu, 21 Oct 2021 09:28:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E3F13857C4C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1634808537; bh=JYmfoKjolQDn36DoXIB1C4iwPNTGzpWGMVpWgYt8bOo=; h=Subject:To:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=scvkWkS3O+YRnSHglui0zn0vrzaqzbHDDjFdLB4TlKCl3uSRIIq7i1vKYOfcVFxBW vF8M1DXT2OPtHVs+gZmsxthUsBLIEf8zdOeyF8jXQWIVU4xuKr/fmU2LopSel2ANio ZJMt5bn5LHI0US56oxKTE/mG7ErSjlwomwtL+z+8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by sourceware.org (Postfix) with ESMTPS id C82523858D39 for ; Thu, 21 Oct 2021 09:28:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C82523858D39 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 2107824002E for ; Thu, 21 Oct 2021 11:28:32 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HZhxC6D9qz6tmR for ; Thu, 21 Oct 2021 11:28:31 +0200 (CEST) Message-ID: <33ec9e0c1e587813b90e8aa771c2c8e6e379dd48.camel@posteo.net> Subject: [PATCH] manual: remove an obsolete requirement on aligned_alloc() usage To: libc-alpha@sourceware.org Date: Thu, 21 Oct 2021 09:28:24 +0000 MIME-Version: 1.0 X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: John Scott via Libc-alpha From: John Scott Reply-To: John Scott Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" I'm not subscribed; please CC me. From 315c821421a2279d77e846bf927b7c4107e32d43 Mon Sep 17 00:00:00 2001 From: John Scott Date: Thu, 21 Oct 2021 05:20:55 -0400 Subject: [PATCH] manual: remove an obsolete requirement on aligned_alloc() usage The C11 standard made it undefined behavior if the size of the allocation was not a multiple of the page size. As discussed at BZ #20137, changes to the standard were proposed and subsequently adopted in Defect Report 460. In particular, the following sentence "The value of alignment shall be a valid alignment supported by the implementation and the value of size shall be an integral multiple of alignment." was changed to "If the value of alignment is not a valid alignment supported by the implementation the function shall fail by returning a null pointer." The DR is at http://www.open-std.org/jtc1/sc22/wg14/www/docs/summary.htm#dr_460 --- manual/memory.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manual/memory.texi b/manual/memory.texi index 0b2b9c87..5c16f7ae 100644 --- a/manual/memory.texi +++ b/manual/memory.texi @@ -995,7 +995,7 @@ power of two than that, use @code{aligned_alloc} or @code{posix_memalign}. @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}. +power of two. The @code{aligned_alloc} function returns a null pointer on error and sets @code{errno} to one of the following values: -- 2.33.0