summaryrefslogtreecommitdiff
path: root/src/cp.c
diff options
context:
space:
mode:
authorRasmus Borup Hansen <rbh@intomics.com>2014-08-11 15:07:05 +0100
committerPádraig Brady <P@draigBrady.com>2014-08-11 15:58:34 +0100
commit65d8e6906ae8752358b4f96153f7a1c5ccec3789 (patch)
treed8f24c04dba2cf0cc68c248faaba57f4eb3bb356 /src/cp.c
parent9bcc626190a7522c2a64dc60bfe0e3910dd4f075 (diff)
downloadcoreutils-65d8e6906ae8752358b4f96153f7a1c5ccec3789.tar.xz
cp: remove redundant possibly expensive heap deallocation
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.
Diffstat (limited to 'src/cp.c')
-rw-r--r--src/cp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cp.c b/src/cp.c
index 99cafa7f5..6c7231a87 100644
--- 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);
}