Patch for cpplib clients to free resources

Zack Weinberg zackw@stanford.edu
Sun Jan 14 12:56:00 GMT 2001


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


More information about the Gcc-patches mailing list