This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for cpplib clients to free resources
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Subject: Re: Patch for cpplib clients to free resources
- From: "Zack Weinberg" <zackw at stanford dot edu>
- Date: Sun, 14 Jan 2001 12:55:55 -0800
- Cc: gcc-patches at gcc dot gnu dot org
- References: <20010114202722.D1001@daikokuya.demon.co.uk>
On Sun, Jan 14, 2001 at 08:27:22PM +0000, Neil Booth wrote:
> This fixes a rather large memory leak in all cpplib clients.
>
> This is my last patch before the slush, after which I'll concentrate
> on performance enhancements (since cpplib has no known bugs :-))
This is likely to be a significant performance regression in itself.
Going through and carefully tearing down all of cpplib's data
structures means making lots of calls to free, which is slow, and
munmap, which is really slow. If we were about to loop back and
compile another file, it would be useful. But when we know the
process is about to exit anyway, I don't see any harm in letting the
operating system clean up after us.
zw