Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Android interpreter stack depth.

Author
Message
paulrobson
9
Years of Service
User Offline
Joined: 22nd Nov 2014
Location: Norfolk, England
Posted: 4th Mar 2015 11:28
I am writing something which has a lot of data in a structure (about 20000 integers - it's a tile table). This appears to be pushing the stack in the interpreter on mobile devices to the limit - causing errors "interp stack" in the ADB log (running it over broadcast crashes)

Can I ask, when you pass a parameter by reference, does it just use an actual reference or does it plonk the whole thing on the stack and remove it again when the function completes ? I suspect the latter because reference parameters are relatively recent ?

If the latter this has issues both for performance and for memory usage.

I can work round it easy enough, but I just wondered.
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 4th Mar 2015 12:53
Paul - What's the data configuration and function call?

That's why Object Pascal case const keyword in function calls. It means "give a read-only pointer."

Onwards and sometimes upwards
paulrobson
9
Years of Service
User Offline
Joined: 22nd Nov 2014
Location: Norfolk, England
Posted: 4th Mar 2015 20:46
Ah, fixed it. Really dumb error. Forgot the 0xCxxxxxxxx is actually negative..... so it allocated insane amounts of memory. Impressed it worked on the PC
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 4th Mar 2015 22:19
We all do it! Join the club...

Onwards and sometimes upwards

Login to post a reply

Server time is: 2024-04-25 10:53:02
Your offset time is: 2024-04-25 10:53:02