From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87497 invoked by alias); 26 Jun 2017 13:47:43 -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 87484 invoked by uid 89); 26 Jun 2017 13:47:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=reclaimed, H*r:sk:static. X-HELO: mail-io0-f182.google.com Received: from mail-io0-f182.google.com (HELO mail-io0-f182.google.com) (209.85.223.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Jun 2017 13:47:42 +0000 Received: by mail-io0-f182.google.com with SMTP id h134so1086892iof.2 for ; Mon, 26 Jun 2017 06:47:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=Swf5gNOcIPoKIUE1G8BqXwc9ROZC1Ez1prOvI/CmBek=; b=Yi/xol3l25+tckKHNwkZN7SjRFEm8S4sH6OGc4QPPMq8ztU6q9EEUBZW+hVx/GjaUD OIfrzmGfGp9wqO7pzcwHfJ+BynZcHHVNNqBrPPn2eeFw7j9qoCiaq7fQZwPNq+VpGL59 vEEfJXTfZZfxBsGyIU/qvh8NQao0t711dLe02RkqLWSp68wJcZGvnJqI1jKEKl/jZypJ lz52LXIZKy6ynnpdWnHLOLfjMRABmbCYxw6HkrfD5nLsZz8VgwNjwRZTvSRvvZXyL8Xh oBTMyxIvVt0iQ5EcwhRfE/J3l5LxASrDHFquylc5Ag/p4NyTy+aanx8HthRRKsEQ8APl B8jg== X-Gm-Message-State: AKS2vOzqicewURVAcD4GhYagOD8ePlvyHQorBE1oaJ0cGDgeU6qadrvS wWBdmwSlrA47A4qH X-Received: by 10.107.52.82 with SMTP id b79mr334123ioa.213.1498484860340; Mon, 26 Jun 2017 06:47:40 -0700 (PDT) Received: from E107787-LIN (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id u186sm54539ita.3.2017.06.26.06.47.39 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 26 Jun 2017 06:47:39 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 02/40] Eliminate make_cleanup_obstack_free, introduce auto_obstack References: <1496406158-12663-1-git-send-email-palves@redhat.com> <1496406158-12663-3-git-send-email-palves@redhat.com> Date: Mon, 26 Jun 2017 13:47:00 -0000 In-Reply-To: <1496406158-12663-3-git-send-email-palves@redhat.com> (Pedro Alves's message of "Fri, 2 Jun 2017 13:22:00 +0100") Message-ID: <86o9tax3m1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00705.txt.bz2 Pedro Alves writes: [I am not sure how many patches in the series I can review, so I may stop at any point.] > These changes in the parsers may not be obvious: > > - obstack_init (&name_obstack); > - make_cleanup_obstack_free (&name_obstack); > + name_obstack.clear (); > > Here, the 'name_obstack' variable is a global. The change means that > the obstack's contents from a previous parse will stay around until > the next parsing starts. I.e., memory won't be reclaimed until them. > I don't think that's a problem, these objects don't really grow much > at all. I don't have a better solution to this, so I have to say that your patch is good enough. Patch is good to me. --=20 Yao (=E9=BD=90=E5=B0=A7)