summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
authorBo Borgerson <gigabo@gmail.com>2008-04-22 16:19:58 -0400
committerJim Meyering <meyering@redhat.com>2008-06-17 00:52:30 +0200
commit94cecb5cf6922130f10a640614fb2e16945c5432 (patch)
treec6d73d47158bdf19f13de11577bb5bf5602f4765 /src/ls.c
parent58db1bb942bd8f23b33d8f21423e7da330312133 (diff)
downloadcoreutils-94cecb5cf6922130f10a640614fb2e16945c5432.tar.xz
join: improve memory management
* src/join.c (struct seq): Use a (struct line **) for `lines' rather than one long (struct line *). This allows individual lines to be swapped out if necessary. (reset_line): Get a line ready for new input. (init_linep): Create a new line and assign it to the the pointer passed in. (spareline[2]): Hold a spare line for each input file. (free_spareline): Clean up. (get_line): Take a (struct line **) instead of a (struct line *). If the line to be overwritten is the previous line for the current file then swap it out for the spare. (join): Accomodate new structure of SEQs and new parameters to get_line; Don't free stale lines until the end -- they're re-usable now. (dup_line): Remove function. * NEWS: Mention the performance improvement.
Diffstat (limited to 'src/ls.c')
0 files changed, 0 insertions, 0 deletions