[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: PCB head fails with ***MEMORY-ERROR***



On Fri, Jun 03, 2011 at 03:41:41PM +0200, Kai-Martin Knaak wrote:
>
> This seems to be a memory leak problem. I noted, that memory usage goes way up
> on rats optimization until it hits the ceiling (memory and swap used 100%).
> See the system log I attached to the lauchpad bug report.
>      https://bugs.launchpad.net/pcb/+bug/792139
> 
> These crashes happen with my current, a bit larger project. The same PCB 
> binary behaves inconspicuously when used with small scale projects. I attached
> a gzip of the offending layout to this mail.  
>

The problem happens in the loop in rats.c, lines 766-784.
There are two functions called, GetNetMemory and GetConnectionMemory.
The first builds up an array of Nets, allocating them in blocks
of 100 (4800 bytes) as needed.

Then, inside each Net, GetConnectionMemory builds up an array
of connections, again in blocks of 100 (4800 bytes) as needed.

I have to go to school now, but if someone else wants to take
a look at this, that's as far as I've gotten.


Also, it gets into this look pretty quickly, so if you put a
few traces statements into that loop, it's safe to run killall
pcb as soon as output appears. Otherwise you'll likely crash
your system.


-- 
Andrew Poelstra
Email: asp11 at sfu.ca OR apoelstra at wpsoftware.net
Web:   http://www.wpsoftware.net/andrew/



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user