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

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



On Sat, 2011-06-04 at 10:51 -0700, Andrew Poelstra wrote:

> Another leak can be seen when zooming in and out. Typing
> ZZZZZzzzzz on the board takes another 12Mb. 

It is only a leak if repeated cycles continue to cause this extra memory
to be allocated.

It is quite possible that hitting different zoom levels causes the
rendering code to evaluate and cache polygon geometry which wasn't
displayed at the previous zoom level.

PS.. Many thanks for fixing that other leak I introduced. I completely
forgot the possibility of breaking out of the loops via other means.

That commit was a quick (but intrusive) change required to fix drawing
whilst auto-routing, and has caused a couple of teething problems so
far. I still think it is the right way to go (moving other types of
memory allocation over to it in the future), but we do need to be
careful about iterating over lists we might modify.

I think the macro loops should ideally be used for read-only access to
the data-structures only. I thought I was being clever (and more robust
against problems) by adding the g_list_copy (), but obviously I had not
taken care of the clean-up correctly.


Best wishes,

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)

Attachment: signature.asc
Description: This is a digitally signed message part


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