make-alpha
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

make ChangeLog dep.h file.c implicit.c main.c r...


From: Paul D . Smith
Subject: make ChangeLog dep.h file.c implicit.c main.c r...
Date: Tue, 12 Apr 2005 23:16:33 -0400

CVSROOT:        /cvsroot/make
Module name:    make
Branch:         
Changes by:     Paul D. Smith <address@hidden>  05/04/13 03:16:33

Modified files:
        .              : ChangeLog dep.h file.c implicit.c main.c read.c 
                         rule.c 

Log message:
        Fix performance degradation introduced by the second expansion feature.
        I did this by adding intelligence into the algorithm such that the
        second expansion was only actually performed when the prerequisite list
        contained at least one "$", so we knew it is actually needed.
        
        Without this we were using up a LOT more memory, since every single
        target (even ones never used by make) had their file variables
        initialized.  This also used a lot more CPU, since we needed to create
        and populate a new variable hash table for every target.
        
        There is one issue remaining with this feature: it leaks memory.  In
        pattern_search() we now initialize the file variables for every pattern
        target, which allocates a hash table, etc.  However, sometimes we
        recursively invoke pattern_search() (for intermediate files) with an
        automatic variable (alloca() I believe) as the file.  When that function
        returns, obviously, the file variable hash memory is lost.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/make/make/ChangeLog.diff?tr1=2.267&tr2=2.268&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/make/make/dep.h.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/make/make/file.c.diff?tr1=1.77&tr2=1.78&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/make/make/implicit.c.diff?tr1=1.46&tr2=1.47&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/make/make/main.c.diff?tr1=1.201&tr2=1.202&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/make/make/read.c.diff?tr1=1.142&tr2=1.143&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/make/make/rule.c.diff?tr1=1.36&tr2=1.37&r1=text&r2=text





reply via email to

[Prev in Thread] Current Thread [Next in Thread]