1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 09:02:46 +00:00
nixpkgs/pkgs/tools/misc/time/max-resident.patch
Eelco Dolstra bd5e996e20 * Apply a patch to fix the "max resident" size reported by ‘time’
being off by a factor of 4.  (The most recent release of ‘time’ is
  from 1996 BTW...)

svn path=/nixpkgs/trunk/; revision=30143
2011-10-31 14:44:32 +00:00

17 lines
697 B
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Fix the "max resident" size reported by time being off by a factor of 4.
From http://lists.gnu.org/archive/html/help-gnu-utils/2010-10/msg00002.html
diff -ru -x '*~' time-1.7-orig/time.c time-1.7/time.c
--- time-1.7-orig/time.c 1996-06-13 15:38:21.000000000 -0400
+++ time-1.7/time.c 2011-10-31 10:40:27.000000000 -0400
@@ -392,7 +392,7 @@
ptok ((UL) resp->ru.ru_ixrss) / MSEC_TO_TICKS (v));
break;
case 'M': /* Maximum resident set size. */
- fprintf (fp, "%lu", ptok ((UL) resp->ru.ru_maxrss));
+ fprintf (fp, "%lu", (UL) resp->ru.ru_maxrss);
break;
case 'O': /* Outputs. */
fprintf (fp, "%ld", resp->ru.ru_oublock);