Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

docs: REPORTMEMORY is in kilobytes, not megabytes



The code in question is this:

    if (reportmemory >= 0 &&
        j->procs->ti.ru_maxrss / 1024 > reportmemory)
        return 1;

Which is documented as
     ru_maxrss    the maximum resident set size utilized (in bytes).

In theory we could change the code, but that would change behavior,
and be different than %D, %K, etc.

so the following is correct:

commit c2aa205a4563845bc3acba7cc745b7b7031fcb79
Author: Eitan Adler <lists@xxxxxxxxxxxxxx>
Date:   Mon Feb 12 17:28:05 2018 -0800

    docs: REPORTMEMORY is in kilobytes, not megabytes

diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo
index 8a7fe5f5f..9ad228679 100644
--- a/Doc/Zsh/params.yo
+++ b/Doc/Zsh/params.yo
@@ -1469,7 +1469,7 @@ is specified with no command.  Defaults to tt(more).
 vindex(REPORTMEMORY)
 item(tt(REPORTMEMORY))(
 If nonnegative, commands whose maximum resident set size (roughly
-speaking, main memory usage) in megabytes is greater than this
+speaking, main memory usage) in kilobytes is greater than this
 value have timing statistics reported.  The format used to output
 statistics is the value of the tt(TIMEFMT) parameter, which is the same
 as for the tt(REPORTTIME) variable and the tt(time) builtin; note that
@@ -1604,7 +1604,7 @@ sitem(tt(%D))(The average amount in (unshared)
data/stack space used in
 kilobytes.)
 sitem(tt(%K))(The total space used (tt(%X)PLUS()tt(%D)) in kilobytes.)
 sitem(tt(%M))(The  maximum memory the process had in use at any time in
-megabytes.)
+kilobytes.)
 sitem(tt(%F))(The number of major page faults (page needed to be brought
 from disk).)
 sitem(tt(%R))(The number of minor page faults.)



-- 
Eitan Adler



Messages sorted by: Reverse Date, Date, Thread, Author