From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83024 invoked by alias); 12 Feb 2020 22:47:29 -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 83016 invoked by uid 89); 12 Feb 2020 22:47:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Feb 2020 22:47:27 +0000 Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id AAC3F1E10B; Wed, 12 Feb 2020 17:47:25 -0500 (EST) Subject: Re: [PATCH 3/8] Change fde table to a vector To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20200208152758.29385-1-tom@tromey.com> <20200208152758.29385-4-tom@tromey.com> <8736bfsaau.fsf@tromey.com> From: Simon Marchi Message-ID: <2ee4a473-24a3-9a1f-f9ac-ec59019bbb3c@simark.ca> Date: Wed, 12 Feb 2020 22:47:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <8736bfsaau.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2020-02/txt/msg00471.txt.bz2 On 2020-02-12 5:36 p.m., Tom Tromey wrote: > Simon> That shrink_to_fit appears to be pointless, as fde_table2 is > Simon> created empty and we only push_back. Maybe you meant to create > Simon> it with an initial size? > > IIUC push_back normally uses some resize factor; the shrink_to_fit is a > request to discard any excess memory allocated this way. Of course, my bad. Simon