From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30646 invoked by alias); 8 Sep 2016 07:10:11 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 30586 invoked by uid 89); 8 Sep 2016 07:10:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=RFA, glibcs, falignnew, folk X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail3-relais-sop.national.inria.fr Received: from mail3-relais-sop.national.inria.fr (HELO mail3-relais-sop.national.inria.fr) (192.134.164.104) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Sep 2016 07:10:09 +0000 Received: from ip-118.net-89-2-234.rev.numericable.fr (HELO laptop-mg.local) ([89.2.234.118]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Sep 2016 09:10:05 +0200 Date: Thu, 08 Sep 2016 08:32:00 -0000 From: Marc Glisse Reply-To: libstdc++@gcc.gnu.org To: Jason Merrill cc: gcc-patches List , libstdc++@gcc.gnu.org, "Joseph S. Myers" Subject: Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-SW-Source: 2016-09/txt/msg00423.txt.bz2 On Thu, 8 Sep 2016, Jason Merrill wrote: > This patch adds support for C++17 allocation of types with alignment > greater than max_align_t using 'new'. This is on by default in C++17 > and can also be enabled for other -std= with -falign-new. Great :-) > If a user wants to use a different boundary than alignof(max_align_t), > perhaps because their malloc provides more or less alignment than > glibc's, they can specify -falign-new=. > > The patch also adds a warning about allocating an over-aligned type > without using an aligned new-operator, which is enabled by -Wall. > > libstdc++ folk: Does my configury handling of different C library > functions that might be usable for aligned allocation make sense? Is > the (standard-conforming) implementation of the nothrow allocation > function OK despite Jonathan's comment in bug 68210? OK for trunk? Do we want a generic fallback implementation (similar to gcc/config/i386/gmm_malloc.h)? A windows version with _aligned_malloc / _aligned_free would also be possible. -- Marc Glisse