From: dada1 <dada1@cosmosbay.com>
To: linux-kernel@vger.kernel.org
Subject: linux-2.6.1 x86_64 : STACK_TOP and text/data
Date: Tue, 27 Jan 2004 10:25:46 +0100 [thread overview]
Message-ID: <40162E9A.1080005@cosmosbay.com> (raw)
In-Reply-To: <OFCE30A640.024A04A1-ONC1256E28.003023EA-C1256E28.0030BF4E@de.ibm.com>
Hi all
Anybody knows why STACK_TOP is defined to 0xc0000000 in x86_64 ?
This means that stack allocated variables are all in the first 4GB
quadrant in memory.
As the default virtual addresses of text/data of a programm are in this
same quadrant, some programming errors could be undetected.
(Some programmers could still cast some pointers to 'unsigned int' for
example, and this could 'work')
Tru64 has a different strategy :
Program text starts at 0x120000000
Program data starts at 0x140000000
Stack is just under text, but still not in the first 4GB quadrant.
This way, programmers errors are likely to be detected at dev time.
Another point is that BSS zone (heap) cannot exceed 3GB in x86_64 mode,
since the brk hit the stack.
libc malloc then fallback to use a lot of arenas... suboptimal in terms
of vmas.
Strangely, in ia32 emulation mode, the stack is placed at the 4GB limit !
Thank you
Eric Dumazet
next prev parent reply other threads:[~2004-01-27 9:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-27 8:52 Cset 1.1490.4.201 - dasd naming Martin Schwidefsky
2004-01-27 9:25 ` dada1 [this message]
2004-01-28 18:05 ` Pete Zaitcev
[not found] <OFCE30A640.024A04A1-ONC1256E28.003023EA-C1256E28.0030BF4E@de.ibm.com.suse.lists.linux.kernel>
[not found] ` <40162E9A.1080005@cosmosbay.com.suse.lists.linux.kernel>
2004-01-27 18:24 ` linux-2.6.1 x86_64 : STACK_TOP and text/data Andi Kleen
2004-01-27 18:57 ` dada1
2004-01-27 19:29 ` Andi Kleen
2004-01-27 19:45 ` dada1
2004-01-27 19:57 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40162E9A.1080005@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox