Home User Application using Hugepage Shared Memory. Allocation error, why?
Reply: 0

User Application using Hugepage Shared Memory. Allocation error, why?

android_dev
1#
android_dev Published in 2017-12-07 20:16:31Z

Trying to execute this sample:

https://github.com/torvalds/linux/blob/master/tools/testing/selftests/vm/hugepage-shm.c

but get:

shmget: Cannot allocate memory



shmget(0x2, 268435456, IPC_CREAT|SHM_HUGETLB|0600) = -1 ENOMEM (Cannot allocate memory)

It is a machine with 8GB RAM and Ubuntu 16.04, Kernel 4.4.0 ia64

free -m
              total        used        free      shared  buff/cache   available
Mem:           7170        1452        4604          77        1112        5361
Swap:          7623           0        7623


cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never

grep -i huge /proc/meminfo
AnonHugePages:    413696 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB

cat /proc/sys/vm/hugetlb_shm_group
0

cat  /proc/sys/kernel/shmmax
18446744073692774399

cat /proc/sys/kernel/shmall
18446744073692774399

Why it does not work?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.30797 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO