Question

Symbian has a stack limit of 8kB. Does this also apply to the function calling in PyS60 apps?

Was it helpful?

Solution

There is a difference between python runtime and python apps. Also from PyS60 app developer point of view, it's the heapsize that's more interesting...

Version 1.9.5 comes by default with heapsize 100k min and 4M max. Of course you can define those by yourself when creating the SIS package to release and distribute your application.

Sorry if I answered right question with wrong answer (stack vs heap).

Stack is usually "enough", but with deep enough recursion you can run out of it. Have done it - and fixed some endless loops :) Never had any real stack problems. Usually it's the heap that runs out, esp with graphics manipulation.

OTHER TIPS

Yes, PyS60 is based on CPython, thus uses the C stack.

Increasing the Symbian stack size is done through a parameter in the mmp file. This is valid when you create a native application that the toolchain will turn into an exe file.

If you were to upgrade the Python runtime on your phone, with a version you built yourself, you could increase the stack size of the runtime process itself.

I would assume that PyS60 should be doing the memory management for you, as your program will probably be constrained by the resources of PyS60.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top