Unix/Linux

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • PAGE_SIZE

    1 answers - 555 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    It seems that I can only get the size of a page at run-time via
    sysconf, rather than having PAGESIZE defined in
    /usr/include/linux/limits.h (or some other header). Two questions:
    1) Is that correct? am I missing something.
    2) Why is it set up that way?
    I am currently working around this by #define'ing PAGE_SIZE and then
    executing:
    assert(PAGE_SIZE == _SC_PAGESIZE);
    but this doesn't make me happy, since it will require a recompile of
    all of my library routines when the page size changes.
  • No.1 | | 602 bytes | |

    bill pursell wrote:

    It seems that I can only get the size of a page at run-time via
    sysconf, rather than having PAGESIZE defined in
    /usr/include/linux/limits.h (or some other header). Two questions:

    1) Is that correct? am I missing something.
    2) Why is it set up that way?

    I am currently working around this by #define'ing PAGE_SIZE and then
    executing:
    assert(PAGE_SIZE == _SC_PAGESIZE);
    but this doesn't make me happy, since it will require a recompile of
    all of my library routines when the page size changes.

    man getpagesize :-)

    Erik

Re: PAGE_SIZE


max 4000 letters.
Your nickname that display:
In order to stop the spam: 8 + 7 =
QUESTION ON "Unix/Linux"

EMSDN.COM