diff --git a/userland/linux/mmap_anonymous.c b/userland/linux/mmap_anonymous.c index 5ea2fa8..3b26ec1 100644 --- a/userland/linux/mmap_anonymous.c +++ b/userland/linux/mmap_anonymous.c @@ -25,8 +25,7 @@ int main(int argc, char **argv) { chars = mmap( NULL, nbytes, - PROT_READ | PROT_WRITE, - MAP_SHARED | MAP_ANONYMOUS, + PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0 ); diff --git a/userland/linux/sysconf.c b/userland/linux/sysconf.c index e07f9da..ac29cd0 100644 --- a/userland/linux/sysconf.c +++ b/userland/linux/sysconf.c @@ -9,5 +9,7 @@ int main(void) { /* Number of processors, not considering affinity: * http://stackoverflow.com/questions/2693948/how-do-i-retrieve-the-number-of-processors-on-c-linux */ printf("_SC_NPROCESSORS_ONLN = %ld\n", sysconf(_SC_NPROCESSORS_ONLN)); + /* CPUs configured by OS during boog. Some may have gone offline, so could be larger than _SC_NPROCESSORS_ONLN.a */ + printf("_SC_NPROCESSORS_CONF = %ld\n", sysconf(_SC_NPROCESSORS_CONF)); return EXIT_SUCCESS; }