This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix memory leak in gengtype


Hello list,

while trying to build gcc-4.6.0 on my sparcstation, I got gengtype OOM killed. That's when I noticed that its RAM usage peaks at 150MB, which is a bit excessive for parsing a ~500K text file.

The attached patch fixes the leak and gengtype now uses a peak of 4MB heap. Hopefully I don't do something wrong, since it took me a while to understand those obstacks...


Thanks, Dimitris


P.S. I was trying to test gcc on a rare arch (sparc-unknown-linux-gnu) but unfortunately the sparcstation crashed and burned after this, so I can't continue the build and report back :-(

Attachment: gcc-gengtype.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]