Find the answer to your Linux question:
Results 1 to 3 of 3
How can I get the page size of my PC in Ubuntu? In proc/meminfo it says something of HugePageSize, but that term of Huge? Is that the solution? Thanks....
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    12

    Getting the page size.

    How can I get the page size of my PC in Ubuntu?
    In proc/meminfo it says something of HugePageSize, but that term of Huge?
    Is that the solution?
    Thanks.

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    955
    Try this link
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,970
    There is a C API function getpagesize(void) that returns the size of a page. Here is a small C program that will print the page size to the terminal:
    Code:
    #include <stdio.h>
    #include <unistd.h>
    int main(void)
    {
         int sz = getpagesize();
         printf("%d\n", sz);
         return 0;
    }
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...