Discussion:
getpagesize differs from exec_pagesize
(too old to reply)
hopehope_123
2005-09-21 14:39:33 UTC
Permalink
hi ,

getpagesize returns: 16kb

/usr/include/asm/param.h , EXEC_PAGESIZE is 65536

Why do they differ?

What is the pagesize?


This is redhat linux ,2.1 , ia64 .


Regards,
hope
Thomas Rongitsch
2005-09-21 19:03:54 UTC
Permalink
Post by hopehope_123
hi ,
getpagesize returns: 16kb
/usr/include/asm/param.h , EXEC_PAGESIZE is 65536
16 kb => 2 ^ 16 = 65536 .... it's just another representation
Post by hopehope_123
Why do they differ?
It's the same.
Post by hopehope_123
What is the pagesize?
http://www.google.at/search?hl=de&q=page+size+virtual+memory&btnG=Suche&meta=
Cheers,
thomas
Tommy Reynolds
2005-09-21 19:18:50 UTC
Permalink
Post by hopehope_123
getpagesize returns: 16kb
/usr/include/asm/param.h , EXEC_PAGESIZE is 65536
Why do they differ?
What is the pagesize?
getpagesize() returns the virtual memory unit of granularity,
determined by the machine hardware.

EXEC_PAGESIZE is a fictional setting that is supposed to represent
the largest page size supported by any executable. It has no
relation to anything real.

Cheers
hopehope_123
2005-09-22 06:01:18 UTC
Permalink
Hi Tommy ,

16 kb => 2 ^ 16 = 65536

isn't it 16kb = 2^14 ?

and 65536 = 64KB. or do i lost my mind and forget the math?

Kind Regards,
hope
Tommy Reynolds
2005-09-22 14:22:47 UTC
Permalink
Post by Thomas Rongitsch
16 kb => 2 ^ 16 = 65536
^^
++---- Typo for 64kb? 64k == 65536 == 2^16
Post by Thomas Rongitsch
isn't it 16kb = 2^14 ?
Yup
Post by Thomas Rongitsch
and 65536 = 64KB. or do i lost my mind and forget the math?
Perhaps, but who am I to judge ;-?

Don't get hung up on getpagesize() .vs. EXEC_PAGESIZE because one is
an apple and the other an orange; any resemblance is purely
accidental.

Cheers

Loading...