Symbian 的堆栈限制也适用于 PyS60 吗?
Symbian 的堆栈限制为 8kB。 这是否也适用于 PyS60 应用程序中的函数调用?
Symbian has a stack limit of 8kB. Does this also apply to the function calling in PyS60 apps?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
是的,PyS60基于CPython,因此使用C堆栈。
Yes, PyS60 is based on CPython, thus uses the C stack.
python 运行时和 python 应用程序之间存在差异。 另外,从 PyS60 应用程序开发人员的角度来看,更有趣的是堆大小......
版本 1.9.5 默认情况下堆大小为 100k(最小值)和 4M(最大值)。 当然,您可以在创建 SIS 包来发布和分发您的应用程序时自己定义这些。
抱歉,如果我用错误的答案回答了正确的问题(堆栈与堆)。
堆栈通常是“足够的”,但如果递归足够深,您可能会用完它。 已经完成了 - 并修复了一些无限循环:) 从未遇到过任何真正的堆栈问题。 通常是堆耗尽,尤其是图形操作时。
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.
增加 Symbian 堆栈大小是通过 mmp 文件中的参数来完成的。
当您创建工具链将转换为 exe 文件的本机应用程序时,这是有效的。
如果您要使用自己构建的版本升级手机上的 Python 运行时,则可以增加运行时进程本身的堆栈大小。
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.
我认为 PyS60 应该为您进行内存管理,因为您的程序可能会受到 PyS60 资源的限制。
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.