From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: How much memory to debug Emacs nowadays? Date: Fri, 01 Dec 2023 20:35:05 +0200 Message-ID: <8334wlai06.fsf@gnu.org> References: <87o7f9g4se.fsf@ledu-giraud.fr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13915"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 01 19:36:25 2023 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 1r98NE-0003Rw-DP for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 01 Dec 2023 19:36:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r98MX-0004y5-OL; Fri, 01 Dec 2023 13:35:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r98MO-0004tr-Ku for help-gnu-emacs@gnu.org; Fri, 01 Dec 2023 13:35:34 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r98ML-0004KP-09 for help-gnu-emacs@gnu.org; Fri, 01 Dec 2023 13:35:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=lz5tubeG3x4iNAEkzBxFAGG5GpAAjYI28nTJvcn7BYw=; b=ZUo4pV7UBUCZ fyuIUjjtMFvU6k2J4gOPxHPl4Rue0IHNJBaOb3p+bCnapyaMKcGS6xfPPHtvDbQ8n2bZJSUAASPa0 pNH/UpWhuAedr007nAfwn3hgzRoYCVXpTJCmu8BSzVptvefv2Y0cPxh9MZwb/6vsdJ101OyyLIhUj ROBKRDEnezY5lRkr2wrY+eO6+F9Pq1h+vs19GU603LV3yCS0spYEMKU+2yLA2x3KxXW1Jic3EEiow 3rADz6uWUWxVcczvJAGF50BaY5b1Ya1VlF5b+//LHYraOu50EqXC6q3iVBgBNCnuehRV3N3gQES3y VqIziqpbJDbW2KOenTOGCw==; In-Reply-To: <87o7f9g4se.fsf@ledu-giraud.fr> (message from Manuel Giraud via Users list for the GNU Emacs text editor on Fri, 01 Dec 2023 19:24:01 +0100) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145599 Archived-At: > Date: Fri, 01 Dec 2023 19:24:01 +0100 > From: Manuel Giraud via Users list for the GNU Emacs text editor > > I was trying to debug Emacs into GDB 9.2 (through M-x gdb into another > Emacs). As instructed by etc/DEBUG, I have compiled it with "-O0 -g3". > > But when I'm running this debugged Emacs, GDB starts to allocates *lots* > of memory (nearly 4GB) and now I regurlarly end up with the following > error: Recursive internal problem. > > I say "now" because this used to work flawlessly some months ago. My > question is: Is 4GB for debugging Emacs expected or is something > misconfigured on my side? Something on your side, I'd say. Just starting "emacs -Q" under GDB takes only between 100MB and 130MB (depending on whether Emacs is built without or with native-compilation) of memory for GDB on my system. (This is GDB 13.1, but I doubt that the GDB version could matter that much.) Does GDB allocate memory right at the beginning, or when you do something specific in Emacs? Also, do you invoke "emacs -Q" from GDB or do you run Emacs with all your customizations?