]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
cp: remove redundant possibly expensive heap deallocation
authorRasmus Borup Hansen <rbh@intomics.com>
Mon, 11 Aug 2014 14:07:05 +0000 (15:07 +0100)
committerPádraig Brady <P@draigBrady.com>
Mon, 11 Aug 2014 14:58:34 +0000 (15:58 +0100)
If the hash structures grow sufficiently large so that
the system is actively swapping, then the deallocation
can take a significant amount of time.  Details at:
http://lists.gnu.org/archive/html/coreutils/2014-08/msg00012.html

* src/cp.c (main): Only call hash deallocation routines
when in lint checking mode.
* THANKS.in: Remove as now in the git author list.

THANKS.in
src/cp.c

index 6fd79d3231ed6c52b39cd08c1f039a099bbc2650..af372a97a9dd59e7ae32974364372f3813b49681 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
@@ -523,7 +523,6 @@ Raimonds Miltins                    raimonds@pro-9.com
 Rainer Orth                         ro@TechFak.Uni-Bielefeld.DE
 Ralf W. Stephan                     stephan@tmt.de
 Ralph Loader                        loader@maths.ox.ac.uk
-Rasmus Borup Hansen                 rbh@intomics.com
 Raul Miller                         moth@magenta.com
 Raúl Núñez de Arenas Coronado       raul@pleyades.net
 Rich Burridge                       rich.burridge@oracle.com
index 99cafa7f56e7ed3b8383391fcec0ad33e56bcef2..6c7231a8736c73e697ef4ad1f26d4c4ec02778d8 100644 (file)
--- a/src/cp.c
+++ b/src/cp.c
@@ -1214,7 +1214,9 @@ main (int argc, char **argv)
   ok = do_copy (argc - optind, argv + optind,
                 target_directory, no_target_directory, &x);
 
+#ifdef lint
   forget_all ();
+#endif
 
   exit (ok ? EXIT_SUCCESS : EXIT_FAILURE);
 }