From: | Max Okumoto <okumoto@xxxxxxxxxxxxxxxxxxxxxxx> |
Date: | Fri, 17 Dec 2004 00:13:30 -0800 (PST) |
okumoto 2004/12/17 00:13:30 PST DragonFly src repository Modified files: usr.bin/make Makefile arch.c compat.c cond.c dir.c for.c job.c lst.h main.c make.c make.h nonints.h parse.c suff.c targ.c var.c usr.bin/make/lst.lib lstConcat.c lstDestroy.c lstDupl.c Log: Instead of dynamically allocating list heads allocated them statically now that their size is only two pointers. This eliminates a lot of calls to Lst_Init and from there to malloc together with many calls to Lst_Destroy (in places where the list is obviously empty). This also reduces the chance to leave a list uninitilized so we can remove more NULL pointer checks and probably eliminates a couple of memory leaks. Taken-from: FreeBSD Author: harti Revision Changes Path 1.15 +1 -1 src/usr.bin/make/Makefile 1.21 +12 -16 src/usr.bin/make/arch.c 1.19 +10 -10 src/usr.bin/make/compat.c 1.17 +2 -2 src/usr.bin/make/cond.c 1.26 +21 -21 src/usr.bin/make/dir.c 1.16 +12 -9 src/usr.bin/make/for.c 1.34 +37 -35 src/usr.bin/make/job.c 1.18 +10 -4 src/usr.bin/make/lst.h 1.37 +50 -41 src/usr.bin/make/main.c 1.17 +35 -38 src/usr.bin/make/make.c 1.15 +24 -19 src/usr.bin/make/make.h 1.21 +2 -2 src/usr.bin/make/nonints.h 1.27 +90 -116 src/usr.bin/make/parse.c 1.22 +178 -187 src/usr.bin/make/suff.c 1.19 +25 -28 src/usr.bin/make/targ.c 1.27 +10 -10 src/usr.bin/make/var.c 1.10 +1 -0 src/usr.bin/make/lst.lib/lstConcat.c 1.12 +3 -13 src/usr.bin/make/lst.lib/lstDestroy.c 1.12 +7 -23 src/usr.bin/make/lst.lib/lstDupl.c http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/Makefile.diff?r1=1.14&r2=1.15&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/arch.c.diff?r1=1.20&r2=1.21&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/compat.c.diff?r1=1.18&r2=1.19&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/cond.c.diff?r1=1.16&r2=1.17&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/dir.c.diff?r1=1.25&r2=1.26&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/for.c.diff?r1=1.15&r2=1.16&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/job.c.diff?r1=1.33&r2=1.34&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/lst.h.diff?r1=1.17&r2=1.18&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/main.c.diff?r1=1.36&r2=1.37&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/make.c.diff?r1=1.16&r2=1.17&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/make.h.diff?r1=1.14&r2=1.15&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/nonints.h.diff?r1=1.20&r2=1.21&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/parse.c.diff?r1=1.26&r2=1.27&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/suff.c.diff?r1=1.21&r2=1.22&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/targ.c.diff?r1=1.18&r2=1.19&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/var.c.diff?r1=1.26&r2=1.27&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/lst.lib/lstConcat.c.diff?r1=1.9&r2=1.10&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/lst.lib/lstDestroy.c.diff?r1=1.11&r2=1.12&f=u http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/lst.lib/lstDupl.c.diff?r1=1.11&r2=1.12&f=u