[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
m4 ./ChangeLog m4/debug.c m4/evalparse.c m4/has...
From: |
Gary V. Vaughan |
Subject: |
m4 ./ChangeLog m4/debug.c m4/evalparse.c m4/has... |
Date: |
Wed, 19 Sep 2001 23:48:05 -0400 |
CVSROOT: /cvsroot/m4
Module name: m4
Changes by: Gary V. Vaughan <address@hidden> 01/09/19 23:48:05
Modified files:
. : ChangeLog
m4 : debug.c evalparse.c hash.c hash.h input.c
ltdl.c m4module.h m4private.h macro.c module.c
output.c symtab.c utility.c
modules : format.c gnu.c m4.c
src : freeze.c m4.h main.c stackovf.c
Log message:
More cleanup. After the last patch, m4_symbol holds nothing but
the head of a chain of m4_token_data. So I have removed the old
m4_symbol, so that m4_token_data chains are stored directly in the
value cell of a hash table node. But there's more... m4_symbol
was a more natural name for the symbol value cell, and now that it
is gone I have renamed the former m4_token_data structure to
m4_symbol. This change turned out to be a pig to get right, since
the original code didn't need to modify the value cell itself,
since changing the chain happened inside the m4_symbol that used
to be returned -- I had to pass the address of the value cell
across various function calls, incase the head value changed. I
also tightened up the memory management to help me find a nasty
memory corruption bug that took me all night to track down...
* m4/m4private.h (struct m4_symbol): Removed.
(struct m4_token_data): Renamed to `struct m4_symbol'. Updated
all references.
* m4/hash.c (m4_hash_iterator_value): Return the address of the
value cell. Updated all callers.
* m4/symtab.c: Took advantage of the simplification in the data
structures to rewrite a lot of this file more simply. There is
still some room for optimisation here, but we should tackle that
systematically closer to the release.
* m4/ltdl.c: Added dmalloc support, and fixed some memory leaks it
revealed. This version is ahead of CVS libtool until I get chance
to flush my changes.
* m4/module.c (m4_module_remove): New function that holds the core
of the old m4_module_unload.
(m4_module_unload): Use it.
(m4_module_unload_all): When we know the modules will never be
used again (i.e. on exit), free up as much module memory as
possible. There are still some artifacts from resident modules
living inside ltdl.c, but everything else is freed.
* m4/debug.c (m4_debug_exit): Free memory allocated in
m4_debug_init().
* m4/input.c (m4_input_exit): Ditto wrt m4_input_init().
* m4/output.c (m4_output_exit): Ditto wrt m4_output_init ().
* src/stackovf.c (stackovf_exit): Ditto wrt setup_stackovf_trap ().
* m4/m4module.h: Updated prototypes.
* m4/hash.c (m4_hash_exit): Free the nodes on the free list.
* m4/hash.h: Updated prototypes.
* src/main.c (main): Use all these new functions to clean up as
much memory as possible before exit.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/ChangeLog.diff?tr1=1.107&tr2=1.108&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/m4/debug.c.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/m4/evalparse.c.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/m4/hash.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/m4/hash.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/m4/input.c.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/m4/ltdl.c.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/m4/m4module.h.diff?tr1=1.28&tr2=1.29&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/m4/m4private.h.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/m4/macro.c.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/m4/module.c.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/m4/output.c.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/m4/symtab.c.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/m4/utility.c.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/modules/format.c.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/modules/gnu.c.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/modules/m4.c.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/src/freeze.c.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/src/m4.h.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/src/main.c.diff?tr1=1.24&tr2=1.25&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/m4/m4/src/stackovf.c.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- m4 ./ChangeLog m4/debug.c m4/evalparse.c m4/has...,
Gary V. Vaughan <=