delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/08/09/14:34:13

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_NEUTRAL
X-Spam-Check-By: sourceware.org
Message-ID: <4E417D8B.2030004@cornell.edu>
Date: Tue, 09 Aug 2011 14:33:47 -0400
From: Ken Brown <kbrown AT cornell DOT edu>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: emacs and large-address awareness under recent snapshots
References: <4E40093D DOT 10107 AT cornell DOT edu> <20110808162556 DOT GM11601 AT calimero DOT vinschen DOT de> <87sjpbhij7 DOT fsf AT Rainer DOT invalid> <4E404424 DOT 9000600 AT cornell DOT edu> <4E40526C DOT 9080605 AT cornell DOT edu> <4E406C21 DOT 7010007 AT cs DOT umass DOT edu> <20110809082652 DOT GA9492 AT calimero DOT vinschen DOT de> <4E4117AF DOT 3030305 AT cornell DOT edu> <4E414054 DOT 6040206 AT cornell DOT edu> <4E4142F7 DOT 8020708 AT cornell DOT edu> <20110809152155 DOT GB17030 AT calimero DOT vinschen DOT de> <4E415E43 DOT 20407 AT cs DOT utoronto DOT ca>
In-Reply-To: <4E415E43.20407@cs.utoronto.ca>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 8/9/2011 12:20 PM, Ryan Johnson wrote:
> I'm pretty sure emacs [thinks it] doesn't even use the system heaps
> (sort of how cygwin doesn't use the windows heaps); from what I
> remember, the "heap" in [t]emacs is an .idata section of the image (12MB
> large on my version of emacs) which is supposed to have unused address
> space afterward, similar to how cygwin allocates its heap. There's even
> a comment there that says they got the idea from cygwin.

I think you're misreading the code.  The 12MB you're talking about is 
the static heap, used as the heap by temacs.  See the discussion of 
bss_sbrk earlier in the thread.  But emacs (as opposed to temacs) will 
start getting addresses in the heap allocated to it by Cygwin as soon as 
it calls sbrk, which it does if it needs more memory.  See 
__default_morecore in gmalloc.c.

> Does anybody know why emacs is accessing anything at 0x80000000 in the
> first place?

As explained earlier in the thread, Cygwin starts the heap at 0x20000000 
or 0x80000000 as of the 2011-07-21 snapshot.  It uses the higher value 
if the application and the system support large address awareness.

Ken

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019