From 6ccf33cdbdfda2aea5d51e4d4991881c74d853d1 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Tue, 20 Mar 2007 03:02:26 +0000 Subject: 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. --- ChangeLog | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index a3b5237..aa8fa94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,31 @@ +2007-03-19 Paul Smith + + * ALL: Use the strcache for all file name strings, or other + strings which we will never free. The goal is to save memory by + avoiding duplicate copies of strings. However, at the moment this + doesn't save much memory in most situations: due to secondary + expansion we actually save prerequisite lists twice (once before + the secondary expansion, and then again after it's been parsed + into individual file names in the dep list). We will resolve this + in a future change, by doing the parsing up-front for targets + where secondary expansion is not set. + + Moving things into the strcache also allows us to use const + pointers in many more places. + +2007-01-03 Paul Smith + + * make.h (ENULLLOOP): Reset errno after each failed invocation of + the function, not just the first. Fixes Savannah bug #18680. + 2006-11-18 Paul Smith * strcache.c (strcache_add_len): Don't allocate a new buffer unless the string is not already nil-terminated. Technically this is a violation of the standard, since we may be passed an array that is not long enough to test one past. However, in make this - is never true since we only use nil-terminated strings. + is never true since we only use nil-terminated strings or + sub-strings thereof. * read.c (eval, do_define): Use cmd_prefix instead of '\t'. @@ -24,6 +45,7 @@ * vmsify.c: Constification. Hard to test this but I hope I didn't screw it up! * vpath.c: Partial constification. + * w32/pathstuff.c: Partial constification. 2006-11-16 Eli Zaretskii -- cgit v1.2.3