views:

256

answers:

5

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

+3  A: 

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

vartec
A: 

So how should I make assingments and call methods to avoid stack overflow :p . And runtime already consumes a big chunk!

Xolve
+1  A: 

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.

QuickRecipesOnSymbianOS
A: 

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.

+1  A: 

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.

JOM