From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79866 invoked by alias); 2 Feb 2017 09:40:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 79844 invoked by uid 89); 2 Feb 2017 09:40:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=noticeable, H*MI:sk:dcfc96d, H*i:sk:dcfc96d, H*f:sk:dcfc96d X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 02 Feb 2017 09:40:19 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 004AA117F17; Thu, 2 Feb 2017 04:40:18 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RL-c34amd9mc; Thu, 2 Feb 2017 04:40:17 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 8FDF9117F10; Thu, 2 Feb 2017 04:40:17 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id F142E6006B; Thu, 2 Feb 2017 13:40:12 +0400 (RET) Date: Thu, 02 Feb 2017 09:40:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: Yao Qi , Alan Hayward , "gdb-patches@sourceware.org" Subject: Re: [PATCH] Removal of uses of MAX_REGISTER_SIZE Message-ID: <20170202094012.dge4r6rsl2skdrii@adacore.com> References: <7CF07197-4FED-4970-BB4B-2FE828E29A63@arm.com> <45e3a5e1-a9aa-1bc0-5d08-526b89fc458e@redhat.com> <20170201124123.GA27498@E107787-LIN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.2-neo (2016-08-21) X-SW-Source: 2017-02/txt/msg00065.txt.bz2 > #2 - Switch to heap allocation > > Or std::vector or something like that that hides it. It's not clear > whether that would have a noticeable performance impact. I would try that. I think using one of the standard C++ classes looks a little more attractive to me, and would only consider the lambda functions if we can show a noticeable performance impact. Those two are not exclusive, by the way, but in the past, we've always frowned on calls to alloca in a loop, and using a xmalloc+cleanup combination has never been an issue in my cases. I'd imagine that a standard C++ memory management class would be fast enough for those same situations. -- Joel