Hi!
On my raspiberry pi , force_page_fault = 0 will still trigger minor page fault.

dmesg output:

I think calling sbrk() directly would be better for illustration purpose:
--- a/ch9/oom_killer_try/oom_killer_try.c
+++ b/ch9/oom_killer_try/oom_killer_try.c
@@ -56,7 +56,7 @@ int main(int argc, char **argv)
printf("%s: PID %d (verbose mode: %s)\n",
argv[0], getpid(), (verbose==1?"on":"off"));
do {
- p = (char *)malloc(BLK);
+ p = sbrk(BLK);
if (!p) {
fprintf(stderr, "%s: loop #%d: malloc failure.\n",
If we call sbrk() instead, minor fault won't happen if force_page_fault = 0:
