memory leak in unload(`gnu')
Eric Blake <[email protected]>
| Newsgroups | gmane.comp.gnu.m4.patches |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This is not a complete fix (I'm still trying to track down where else memory is being leaked), but greatly reduces the lost memory when repeatedly loading and unloading the gnu module (before the patch, the added test grew to over 5.5M of mem usage; after, it grew to just 3.2M). I also found a libltdl memleak in the process. I wish I knew a portable way to artifically cap the heap usage and cause a memory exhausted error in the face of a leak, without making the test take too long to execute. But this test is at least valuable in that we don't coredump when the gnu module is dlpreloaded, and hence variables aren't reset to their initial state between unload and load (as I did run into that situation while preparing this patch). 2006-10-03 Eric Blake <[email protected]> Partially plug memory leak when unloading gnu module. * tests/modules.at (unload gnu module): New test. * modules/gnu.c (gnu_LTX_m4_finish_module): New function. (m4_regexp_compile): Move static storage to module visibility. * tests/options.at (--debug): Adjust to new output. - -- Life is short - so eat dessert first! Eric Blake [email protected] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFIl3984KuGfSFAYARAskiAJwL570lV6lKz2c9CO1TWQdLVuLBXQCgwwma xP2AA+44D6cpBTJiZfVwukg= =2qlf -----END PGP SIGNATURE-----