From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.help Subject: Re: How to debug memory leaks Date: Sat, 27 Mar 2021 09:20:40 +0100 Message-ID: References: <87pmzmihyj.fsf@robertthorpeconsulting.com> <83lfaaot5h.fsf@gnu.org> <83k0puorpb.fsf@gnu.org> <83ft0hq4wb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31516"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 27 09:21:09 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lQ4Bw-00083n-2S for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 27 Mar 2021 09:21:08 +0100 Original-Received: from localhost ([::1]:35046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQ4Bv-000372-1w for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 27 Mar 2021 04:21:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQ4BZ-00036o-Ug for help-gnu-emacs@gnu.org; Sat, 27 Mar 2021 04:20:45 -0400 Original-Received: from mail-oln040092064060.outbound.protection.outlook.com ([40.92.64.60]:24803 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQ4BX-0002LK-V9 for help-gnu-emacs@gnu.org; Sat, 27 Mar 2021 04:20:45 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nN3C7bosCSD1Q1aNUjKFsO3e1osi0BYm2NL2EDm1ZRyvxMRN9RMDDDUy5az7Jqh4ZWPYgodVeso9QH5Q1r+4WzjkBCXim0g2qBesmk0nP+bZdgfuFpWG60rigGMCtOWfh8q6f886i9cdVNtPuzpaq8JwUdWaA2gKdsladFkxnNdP4xJSFZ+tNxUDIA3gbRc0MYkRAUHLt4basCtla2cN/QPXgKftNdQ+JTC59cvQPyjweUrwP7GDAdiex7JsUMESwuPJPk1Q9fMexdO6iyYRPjhXlY0IPIM7tW6/yTqOwAwbpXIyVF1mfSG7oxrcIthFZVh603Ck1K6my5dmjZGR7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q/gSjBU7pV00wy2dhW1hT12MRJwDl/fBFcZoDOYadHg=; b=fJ/5VCtdIMJz1+D9K8aoAz5GHWS91Y4DUJv8cLcEHxTW8KN82FfAWwAQ3DGfCgHw1CHBwx7CWNzHCT7Z/7Q2K7HQFUte+ccNwsZaIlfO15B7JI2/v14jb4Biecgv3gpX3rRV/7XNoxL6pB7zUYvj/QcmOl/nnbBbvOOOYsWYp9NNO1hQeeftqtUsln46d1aCN4ze71uM+nHuoXzuUJkfk4U+BYOo5fZzlGZkwXHG4Dvcx285W6PYZIRgeBY4UsXAQpW+h1rm4GNL5H3F2AQN80dHOvbudIqpLBzLsiXoWBHEdJN6QBRhHWVU7X0zb+fvj9wA5mYDQ1n67rUEze5Rvw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q/gSjBU7pV00wy2dhW1hT12MRJwDl/fBFcZoDOYadHg=; b=FeNwFHJ/1foru+8VJMTjcGIE2UM/l/WZrYXA7fcQwLrFB07SR1ZdwWA6mPrp6tqj6nSF+iF0vIZ5zvQr3LxCMj5EfzlAdjkVp1yeMRD3ZTu1Wzqm5Pe1g9mOessrJs7QCBeo1/vMOeqZuR7ie77AXgrJxtPV/vfVOhEIdGKSjBgfmJBjnXucO1v/pCZrr9IARHG9hC5lVjIC3vyykonZJt8GkrjuG3AODWyjBkX1X+AhqGJh1kvTBFKIydEAkjANvyKOWsh5516o5baQr8ClkCg3kb2ByLFL2p8nv17zfUWyvVf0Ek2jSQ93Xli8//uzWWAPa9vrj3Ev/rbG0AKoxA== Original-Received: from VE1EUR01FT004.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e19::45) by VE1EUR01HT160.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e19::469) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.29; Sat, 27 Mar 2021 08:20:41 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:7e19::4f) by VE1EUR01FT004.mail.protection.outlook.com (2a01:111:e400:7e19::101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25 via Frontend Transport; Sat, 27 Mar 2021 08:20:41 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:3F3FB5810FE88276EEE260BF79F6DF6524FCE636D12B8925C7DB9CE983AAE47A; UpperCasedChecksum:C6741857EB8C18F4AC583CC468E6A61E990181DE86B49E544A3863E67E1524F9; SizeAsReceived:8081; Count:46 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b%6]) with mapi id 15.20.3977.031; Sat, 27 Mar 2021 08:20:41 +0000 In-Reply-To: (Stefan Monnier's message of "Fri, 26 Mar 2021 12:44:50 -0400") X-TMN: [XTHzEokJqLxMnD3VVqrEYEIRAq2uQi24] X-ClientProxiedBy: AM6PR0202CA0065.eurprd02.prod.outlook.com (2603:10a6:20b:3a::42) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87czvlc8iv.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM6PR0202CA0065.eurprd02.prod.outlook.com (2603:10a6:20b:3a::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25 via Frontend Transport; Sat, 27 Mar 2021 08:20:40 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 7e50434e-5a39-47f9-402d-08d8f0f93585 X-MS-TrafficTypeDiagnostic: VE1EUR01HT160: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EwU6zSd8joM90nSTBBrOGGRE3UxHUmxETsGamK7YZ6UphPKaiJ55xT49WRAs6UYZtHnVHaPQZ5KNEoeAHjNvQ7MLZ1J5qJnTq0Mp+wICO22LqqToujNPgKpI/W4EYVhlUQ+ezu2X63KcYZjaJK+2E3dZnhLiLVMrv0O8hi2zSuTlmgiAatc9MOU6Ey1PmvQR3GJuAE6jjg51NRjaCdgGRizYpTOOaXge3iXM/xsLud2gXDqNCwV/DihZ4wyhAnPK4IXgR17SS+Oq62vMBrhuAE/Z2PzMOhfFuv2Q5iZ1TS81qzX+p9eBoZ2BtfBu/AmYV07xE7LotF6wF0Smp8V+/Z36wBdnNDEFoAhvIWVifuKO2DSzG0swpZf/EYdBE6Y5oeAofqUcQOjzTaG6mL8pQw== X-MS-Exchange-AntiSpam-MessageData: D38NrfdA1R98Fndqml3keKETgmp2c6bvCTHQGG//jDPuh5k5KZSRXGzDcs70JO1RSO+V7YMxpbjfG7dXU0rDGqSmyUEv1+HV2zuj46BWbQbF25qJ7Pvn/nUM75dvgvd/Zaw1VcPJ+VeyZ+5Xmq9KQQ== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7e50434e-5a39-47f9-402d-08d8f0f93585 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2021 08:20:41.1399 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: VE1EUR01FT004.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR01HT160 Received-SPF: pass client-ip=40.92.64.60; envelope-from=arthur.miller@live.com; helo=EUR01-DB5-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128704 Archived-At: Stefan Monnier writes: >> Yes, that is why I ment a hook that will be avaialble for mode writers >> to put potential "cleanup" into since users probably don't know and >> should not need to know the details. > > What I meant is that if the mode's writer knows that this variable can > be a source of problem, he can just as well fix those problem (or > report the problem and have someone else fix the problem). "Source of a problem" is probably a bit too heavy expression :). For example if I have had a file with lots of undo history, I wouldn't say it was a source of a problem, but I might decide that I wish to get rid of the undo history, and start it from clean, without killing the buffer and opening it a new. >> I used undo history as example, but I ment bunch of other stuff. No idea >> how much it would give in practice though. > > So, there's no concrete existing example of stuff that could be added to > this "cleanup hook" :-( I was trying to reason in terms of a general facility. What do I know what people use, no idea what can be "throwable" in different modes.