Author: eelco
Date: Mon Oct 31 14:44:32 2011
New Revision: 30143
URL: https://nixos.org/websvn/nix/?rev=30143&sc=1
Log:
* 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...)
Added:
nixpkgs/trunk/pkgs/tools/misc/time/max-resident.patch
Modified:
nixpkgs/trunk/pkgs/tools/misc/time/default.nix
Modified: nixpkgs/trunk/pkgs/tools/misc/time/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/tools/misc/time/default.nix Mon Oct 31 12:48:59
2011 (r30142)
+++ nixpkgs/trunk/pkgs/tools/misc/time/default.nix Mon Oct 31 14:44:32
2011 (r30143)
@@ -8,6 +8,8 @@
sha256 = "0va9063fcn7xykv658v2s9gilj2fq4rcdxx2mn2mmy1v4ndafzp3";
};
+ patches = [ ./max-resident.patch ];
+
meta = {
description = "GNU Time, a tool that runs programs and summarizes the
system resources they use";
Added: nixpkgs/trunk/pkgs/tools/misc/time/max-resident.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/tools/misc/time/max-resident.patch Mon Oct 31
14:44:32 2011 (r30143)
@@ -0,0 +1,16 @@
+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);
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits