From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30639 invoked by alias); 16 Nov 2015 18:56:52 -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 29909 invoked by uid 89); 16 Nov 2015 18:56:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 16 Nov 2015 18:56:51 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id E4E19C10046C; Mon, 16 Nov 2015 18:56:49 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tAGIulUL012454; Mon, 16 Nov 2015 13:56:47 -0500 Message-ID: <564A26EE.9090306@redhat.com> Date: Mon, 16 Nov 2015 18:56:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Jonathan Wakely CC: Jonathan Wakely , Daniel Gutson , Martin Sebor , Aurelio Remonda , libstdc++ , "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH] Add configure flag for operator new (std::nothrow) References: <1446554133-3090-1-git-send-email-aurelio.remonda@tallertechnologies.com> <56391843.1070807@gmail.com> <563C79EB.7090302@gmail.com> <20151110131014.GC2937@redhat.com> In-Reply-To: <20151110131014.GC2937@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-11/txt/msg01986.txt.bz2 On 11/10/2015 01:10 PM, Jonathan Wakely wrote: > On 06/11/15 09:59 +0000, Pedro Alves wrote: >> On 11/06/2015 01:56 AM, Jonathan Wakely wrote: >>> On 5 November 2015 at 23:31, Daniel Gutson >> >>>> The issue is, as I understand it, to do the actual work of operator >>>> new, i.e. allocate memory. It should force >>>> us to copy most of the code of the original code of operator new, >>>> which may change on new versions of the >>>> STL, forcing us to keep updated. >>> >>> It can just call malloc, and the replacement operator delete can call free. >>> >>> That is very unlikely to need to change (which is corroborated by the >>> fact that the default definitions in libsupc++ change very rarely). >> >> Or perhaps libsupc++ could provide the default operator new under >> a __default_operator_new alias or some such, so that the user-defined >> replacement can fallback to calling it. Likewise for op delete. > > That could be useful, please file an enhancement request in bugzilla > if you'd like that done. > I'll leave that to Daniel/Aurelio. Thanks, Pedro Alves