|
From: Jeremy F. <je...@go...> - 2003-09-01 20:38:14
|
On Fri, 2003-08-29 at 04:23, Nicholas Nethercote wrote: > AIUI, this is because 0xc0000000 and above is used by the kernel. > > Is it safe to rely on this? Could the value change, eg. if someone > fiddled with and recompiled their kernel? Is there some nicer way to find > the maximum legitimate user-space address, eg. a macro or something > similar? I think the kernel always starts the user stack at the very top of the user address space, so you can can /proc/self/maps to see what the highest address present is. 0xc0000000 certainly isn't a constant - it can be easily changed as part of the kernel compilation options. There is also an experimental patch for 2.6 which allows a full 4G user address space, so it may be possible to wrap from one end of the user address space to the other. J |