how to query huge page size?



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?

TIA,
dchev

.