How to get 'sysctl vm.max_map_count', or the '/proc/sys/vm/max_map_count' using C++
I do not want to open the /proc/sys file.. Is there a http://man7.org/linux/man-pages/man2/sysctl.2.html call to get the number ?
How to get 'sysctl vm.max_map_count', or the '/proc/sys/vm/max_map_count' using C++
I do not want to open the /proc/sys file.. Is there a http://man7.org/linux/man-pages/man2/sysctl.2.html call to get the number ?
This sysctl command will return a key value pair.
This sysctl command will return the same key value pair.
This sysctl command will return the same key value pair.
This sysctl command will return the same key value pair.
There is your answer. However, I would rather open /proc/sys/vm/max_map_count as a file and read the value verses executing a process from a C program. Calling sysctl in a bash script to set a variable would make more sense.