https://bugs.winehq.org/show_bug.cgi?id=18745
Saulius K. saulius2@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |saulius2@gmail.com
--- Comment #20 from Saulius K. saulius2@gmail.com --- Created attachment 53475 --> https://bugs.winehq.org/attachment.cgi?id=53475 test program for libhugetlbfs
(In reply to Austin English from comment #17)
I wasn't able to get that working on Fedora, using the sample code from https://stackoverflow.com/questions/17225200/how-to-get-the-value-of-huge- page-size (even after installing libhugetlbfs-devel).
And for me it worked . I extended source code of the test program a bit (attaching it) and got this:
huge page size = 2097152 huge page sizes [1] = 2097152 page sizes [2] = 4096 2097152 PF_LINUX_HUGETLB = 1048576
Austin, what exactly didn't work for you?
Getting it from /proc/meminfo seems to work though: [austin@localhost ~]$ cat /proc/meminfo | grep Huge AnonHugePages: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB
I've put together a patch that does that, instead.
On my system I get similar results only with an exception for AnonHugePages:
AnonHugePages: 102400 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB
But /proc/mem way is probably more hassle-free than linking to libhugetlbfs and using it.