]> git.lizzy.rs Git - plan9front.git/commitdiff
venti: inform user when reducing memory consumption
authorNoam Preil <noam@pixelhero.dev>
Mon, 21 Jun 2021 03:49:42 +0000 (03:49 +0000)
committerNoam Preil <noam@pixelhero.dev>
Mon, 21 Jun 2021 03:49:42 +0000 (03:49 +0000)
sys/src/cmd/venti/srv/venti.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 1cf67a1..6b02efa
@@ -97,8 +97,10 @@ allocbypcnt(u32int mempcnt, u32int stfree)
                fprint(2, "%s: bloom filter bigger than mem pcnt; "
                        "resorting to minimum values (9MB total)\n", argv0);
        else {
-               if (avail >= 3840UL * 1024 * 1024)
+               if (avail >= 3840UL * 1024 * 1024){
                        avail = 3840UL * 1024 * 1024;   /* sanity */
+                       fprint(2, "%s: restricting memory usage to 3840MiB\n", argv0);
+               }
                avail /= 2;
                all.icmem = avail;
                avail /= 3;