Code::Blocks

User forums => General (but related to Code::Blocks) => Topic started by: Kazade on August 13, 2010, 01:15:45 pm

Title: C::B using huge amounts of memory
Post by: Kazade on August 13, 2010, 01:15:45 pm
I'm having some real problems with CodeBlocks on a reasonably large project (~20,000 lines). I'm using the latest build from Pasgui's Ubuntu repository on Ubuntu 10.10. The problem I'm having is that everything will work fine for an hour or so, and then the hard disc starts churning and the PC becomes pretty unresponsive (although not totally). When I run "top" it shows that C::B is using 70-80% of my memory (around 2.7G) and the CPU is using around ~60.0% I think the general slow down is due to the disk swapping when I run out of memory.

This seems to be related to the code completion plugin. I've just disabled it and restarted C::B and now memory usage is a far more respectable 465M and CPU ~3%.

Has anyone else experienced a problem like this?
Title: Re: C::B using huge amounts of memory
Post by: oBFusCATed on August 13, 2010, 01:56:49 pm
Looks like you've written some code that breaks the parser in the code completion plugin.
Can you try to produce a minimal project that reproduces the problems?
Title: Re: C::B using huge amounts of memory
Post by: Kazade on August 13, 2010, 04:05:03 pm
Um, I would... but I'm not even sure where to begin, how can I tell where the problem is?
Title: Re: C::B using huge amounts of memory
Post by: ollydbg on December 09, 2010, 02:59:37 am
codecompletion plugin use a TokensTree structure to store all the Tokens( the same term is the Tag). so if your project is large, the TokensTree may explode.

But I suspect the problem is located in some macro expansion. You can try to disable the "macro expansion" option in the CC's option dialog and see it happens again.  :D

BTW: try use a more recent codeblocks, like nightly build version.