How can i get and change the stack size (even for the main thread) of my Android application.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
AFAIK -Xss can be used as a command line to change the main threads stacks size, if not using the command line the app framework will use the default size. In this case if you need more stack you will need to start a thread (using this ctor) to do the work.
回答2:
The main thread stack size is set in the firmware and cannot be modified, short of modifying the firmware for your own phone. As Mr. Strong indicates, for threads you fork, you can set your own stack size.