Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 2021  / 1 Year ago, wed, march 29, 2023, 5:08:20

From man time:


M      Maximum resident set size of the process during its lifetime, in Kilobytes.

From ulimit -a:


max memory size         (kbytes, -m) unlimited

But a "kilobyte" may mean either 1000 or 1024 bytes. I guess here it is a round 1024, but I want to be sure. Authoritative reference would be appreciated.


Feel free to rephrase my question as: do time and ulimit conform to the IEC recommendation, or use "kilobyte/kbyte" in the kibibyte meaning.


More From » ram

 Answers
6

No, kilobytes is 1000. We follow the International System of Units so the prefix "kilo" refers to 1000 not 1024. Any other reference is wrong.


1024 is Kibibytes (kilo binary)



From ulimit -a:


max memory size (kbytes, -m) unlimited



This I consider a bug. It should explicity state kilo or kibi; not kbytes



man time:


M Maximum resident set size of the process during its lifetime, in Kilobytes.




  • ulimit uses KIBIbytes


    limit.rlim_cur = newlimit * 512;
    limit.rlim_max = newlimit * 512;


  • GNU time usus KIBIbytes if you look at the source. The manual is wrong.


    It uses:


    tmp = pages / 1024;  /* Smaller first, */
    size = tmp / 1024; /* then smaller. */



[#252] Thursday, March 30, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
musining

Total Points: 171
Total Questions: 124
Total Answers: 121

Location: Zambia
Member since Thu, Jun 25, 2020
4 Years ago
;