[project @ 2002-02-01 10:50:35 by simonmar]
authorsimonmar <unknown>
Fri, 1 Feb 2002 10:50:35 +0000 (10:50 +0000)
committersimonmar <unknown>
Fri, 1 Feb 2002 10:50:35 +0000 (10:50 +0000)
commitb8684d5878747f33b67441c8ddaee286b47d0f32
treeeab0550d23d464f72760a569a13541450d6884b0
parent7d1c6665d8ec970903c651c35ee7305aba2d2557
[project @ 2002-02-01 10:50:35 by simonmar]
When distinguishing between code & data pointers, rather than testing
for membership of the text section, test for not membership of one of
the data sections.

The reason for this change is that testing for membership of the text
section was fragile:  we could only test whether a value was smaller
than the end address, because there doesn't appear to be a portable
way to find the beginning of the text section.  Indeed, the test
breaks on very recent Linux kernels which mmap() memory below the
program text.

In fact, the reversed test may be faster because the expected common
case is when the pointer is into the dynamic heap, and we eliminate
these case immediately in the new test.  A quick test shows no
measurable performance difference with the change.

MERGE TO STABLE
ghc/rts/Storage.h