Discussion:
Not Page Aligned Segments
(too old to reply)
Kelvin
2011-07-23 14:42:12 UTC
Permalink
Hi,

I noticed some segments are not page aligned.
For example is a segment starts on 0x441ad0 and contains data smaller
that page size.

In this case, should we allocate a page and zeroout the first amount and
start the reading information partway into the page?
Ben Langmuir
2011-07-23 14:54:48 UTC
Permalink
That's what I've done. You definitely want to write starting at the
actual segment base, rather than the page's base address if they're
different, or many of the tests will break.

Ben
Post by Kelvin
Hi,
I noticed some segments are not page aligned.
For example is a segment starts on 0x441ad0 and contains data smaller
that page size.
In this case, should we allocate a page and zeroout the first amount and
start the reading information partway into the page?
Kelvin
2011-07-23 15:47:23 UTC
Permalink
That's what I've done. You definitely want to write starting at the
actual segment base, rather than the page's base address if they're
different, or many of the tests will break.
Ben
Post by Kelvin
Hi,
I noticed some segments are not page aligned.
For example is a segment starts on 0x441ad0 and contains data smaller
that page size.
In this case, should we allocate a page and zeroout the first amount and
start the reading information partway into the page?
Thanks for confirming that.

Is there a reason for having unpage-aligned segments?

Loading...