pcb

Comment 5 for bug 792139

Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

Bug was fixed by a commit
git master commit d30d31425fa318390e4632d5063e6bb655b01793
http://git.gpleda.org/?p=pcb.git;a=commit;h=d30d31425fa318390e4632d5063e6bb655b01793

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.

    Closes-bug: lp-792139