commit d30d31425fa318390e4632d5063e6bb655b01793
Author: Andrew Poelstra <email address hidden>
Commit: Andrew Poelstra <email address hidden>
Remove memory allocation from src/macro.h
When we started using GLists for various objects, we
also changed the looping macros to allocate copies of
the list in order to avoid problems with list integrity
in case items were removed during the iteration.
However, this caused memory leaks whenever there was an
early return from the middle of the list. Bug lp-792139
shows pcb using over 2Gb of memory and crashing when
optimizing rats on a large board.
This patch saves the next pointer before the loop body,
rather than allocating a whole new list, to handle element
deletions.
Bug was fixed by a commit 90e4632d5063e6b b655b01793 git.gpleda. org/?p= pcb.git; a=commit; h=d30d31425fa31 8390e4632d5063e 6bb655b01793
git master commit d30d31425fa3183
http://
commit d30d31425fa3183 90e4632d5063e6b b655b01793
Author: Andrew Poelstra <email address hidden>
Commit: Andrew Poelstra <email address hidden>
Remove memory allocation from src/macro.h
When we started using GLists for various objects, we
also changed the looping macros to allocate copies of
the list in order to avoid problems with list integrity
in case items were removed during the iteration.
However, this caused memory leaks whenever there was an
early return from the middle of the list. Bug lp-792139
shows pcb using over 2Gb of memory and crashing when
optimizing rats on a large board.
This patch saves the next pointer before the loop body,
rather than allocating a whole new list, to handle element
deletions.
Closes-bug: lp-792139