Re: how to query huge page size?



On 22 Mrz., 16:50, dch...@xxxxxxxxx wrote:
I use hugetlbfs for my application, and I'm wondering what the best
way to determine the huge page size on the system (for examples, x86
can be 2MB or 4MB, powerpc might be 16MB or 256MB).

I'd like something like "sysconf(_SC_HUGE_PAGESIZE) "

The only way I can find right now is to parse /proc/meminfo

Anyone know of a good way, or is /proc/meminfo really the only way?

On modern CPU's (this means in the last 10 years) the page size is not
a constant value.
Some ranges of address space might have 4kb values others 4mb.

.



Relevant Pages

  • [tip:x86/urgent] x86: SGI UV: Map MMIO-High memory range
    ... Commit-ID: daf7b9c9216e2b82e4c14b7248a85286dab021c3 ... x86: SGI UV: Map MMIO-High memory range ... x86: Make 64-bit efi_ioremap use ioremap on MMIO regions ... mapped the ranges. ...
    (Linux-Kernel)
  • Re: Adobe Flashplayer 9 beta for Solaris available
    ... more modern than x86.) ... Rich Teer, SCSA, SCNA, SCSECA, OpenSolaris CAB member ...
    (comp.unix.solaris)
  • [9fans] non-PC hardware
    ... I depressed myself my reading ... other than x86 there's nothing modern ... that runs plan9 ...
    (comp.os.plan9)
  • [git pull] x86 fixes
    ... x86: oprofile: don't set counter width from cpuid on Core2 ... Yinghai Lu: ... fix init_memory_mappingto handle small ranges ...
    (Linux-Kernel)
  • Solaris x86 Browser
    ... Where may I find a compiled browser for Solaris 10 x86? ... I am looking for Mozilla or Firefox or anything modern. ...
    (comp.unix.solaris)