emacs and large-address awareness under recent snapshots

Ken Brown kbrown@cornell.edu
Tue Aug 9 18:34:00 GMT 2011


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



More information about the Cygwin mailing list