Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code wastes stack memory on AGCM4 #130

Open
greymfm opened this issue May 19, 2023 · 2 comments
Open

code wastes stack memory on AGCM4 #130

greymfm opened this issue May 19, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@greymfm
Copy link
Member

greymfm commented May 19, 2023

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? :)

@greymfm greymfm added the bug Something isn't working label May 19, 2023
@greymfm greymfm changed the title code consumes stack memory on AGCM4 code wastes stack memory on AGCM4 May 19, 2023
@elude76
Copy link

elude76 commented May 22, 2023

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
Copy link

W1976 commented Jun 13, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants