X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Sun, 7 Aug 2011 13:33:54 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: emacs and large-address awareness under recent snapshots Message-ID: <20110807113354.GG11601@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4E3C79E0 DOT 3030506 AT cornell DOT edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4E3C79E0.3030506@cornell.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Aug 5 19:16, Ken Brown wrote: > Starting with the 2011-07-21 snapshot, emacs doesn't work well with > the large-address-awareness flag set (under 64-bit Win7). As soon > as emacs is started, a *Warning* buffer is created with the > following message: > > Emergency (alloc): Warning: past 95% of memory limit > > To reproduce, install emacs and do the following: > > $ peflags --bigaddr=1 /usr/bin/emacs-nox.exe > > $ emacs-nox.exe -Q Yes, I can reproduce the message, but I have not the faintest idea why emacs thinks so. If you look into the process map, you'll see the following: $ ps | grep emacs 280 2852 280 2796 0 11001 13:02:21 /usr/bin/emacs-nox $ less /proc/280/maps [...] 80000000-8064E000 rw-p 00000000 0000:0000 0 [heap] 8064E000-98000000 ===p 0064E000 0000:0000 0 [heap] Starting with the 2011-07-21 the heap starts at 0x80000000 if the application (and the system) is large address aware. Even if you dont see the "[heap]" decoration(*), the heap is at that address. What you can see is this: - The heap is located at 0x80000000 and has a size of 384 Megs (the default start size), up to address 0x98000000. - Only the first 0x64e000 (== 6610944) bytes are allocated so far, so there are still about 254 Megs left on the heap. I did set breakpoints to all functions returning malloc information, but emacs doesn't call one of them. Is there a chance that emacs does some invalid 32 bit pointer arithmetic and just gets confused? Corinna (*) I just checked in a patch to Cygwin which fixes printing the "[heap]" text in the right column. In your case there's a good chance that it's missing. -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple