This is a major update, which switches virtually every allocated-but-not-freed
commitb76764695ced6061579f15354667317aa9d63947
authorpsmith <psmith>
Tue, 20 Mar 2007 03:02:26 +0000 (20 03:02 +0000)
committerpsmith <psmith>
Tue, 20 Mar 2007 03:02:26 +0000 (20 03:02 +0000)
treee7bec0b4a80ca7d7b4696961dc9d6828fefdf28f
parent30e2f2f5fd4bb6f2ecee3cae9db23c20d9fbd656
This is a major update, which switches virtually every allocated-but-not-freed
string into the strcache.  As a side-effect, many more structure members and
function arguments can/should be declared const.

As mentioned in the changelog, unfortunately measurement shows that this
change does not yet reduce memory.  The problem is with secondary expansion:
because of this we store all the prerequisites in the string cache twice.
First we store the prerequisite string after initial expansion but before
secondary expansion, then we store each individual file after secondary
expansion and expand_deps().  I plan to change expand_deps() to be callable
in either context (eval or snap_deps) then have non-second-expansion
targets call expand_deps() during eval, so that we only need to store that
dependency list once.
27 files changed:
ChangeLog
ar.c
commands.c
default.c
dep.h
dir.c
expand.c
file.c
filedef.h
function.c
implicit.c
job.c
main.c
maintMakefile
make.h
misc.c
read.c
remake.c
rule.c
rule.h
strcache.c
tests/run_make_tests.pl
tests/scripts/features/patternrules
tests/test_driver.pl
variable.c
variable.h
vpath.c