Ardumower / Sunray

Ardumower Sunray
71 stars 54 forks source link

code wastes stack memory on AGCM4 #130

Open greymfm opened 1 year ago

greymfm commented 1 year ago

Am AGCM4 geht der Stack-Pointer in der Console ständig hoch, der Code verbraucht also ständig neuen Stack-Speicher.

Debugging zeigt:

Irgendwas wird da falsch kompiliert - es hat mit der klasse "OP zu tun (src/op/op.cpp)" - ich kann den run()-code in robot.cpp reduzieren auf : outputConsole();
watchdogReset();

und in outputConsole auf: activeOp->getOpChain()

und in Op::getOpChain() auf : return "test";

--- das reicht bereits um den stack zu verbrauchen - derselbe testcode in einem neuen programm verbraucht aber kein stack... Screenshot from 2023-05-19 21-25-32

Any Ideas? :)

elude76 commented 1 year ago

Hi, just to make sure from which part increases the stack pointer. As that could be the getOpChain, the SP function or the print: -make a loop (for) to loop the aop->geOptChain(), and then check if the SP has been increased by the same number for the same number of call

W1976 commented 1 year ago

War dass das Speicherverbrauchsproblem, wegen dem das dynamische Mähen rausflog?