Can anyone confirm this issue (limited number of file descriptors on some Android devices)?

徘徊边缘 提交于 2019-12-18 16:12:11

问题


I'm currently working on a cool Android game which was about to be released real soon. Some of our beta testers started complaining that the game crashes with the “too many open files” error message. I've tried simulating this problem on the AVD emulator but couldn't reproduce the error.

Afterwards, I realized that only our Galaxy S3 and Asus Nexus 7 testers were complaining. I found this bug issue on Android's bug tracker and it sounds quite similar to what is happening to me.

This sounds like a serious architecture problem which effects all internal SD card devices. These devices are limited to only 1024 file descriptors! Can anybody confirm this problem?


回答1:


Actually it is not relevant whether this app is opening a lot of files or not. What's troubling is that the entire device is limited to 1024 open files. Take for instance a Galaxy S3 device running 100 apps each opening 10 files concurrently(properties, databases and the like). This is extremely close to the limit.

If you check the max open files limit (/proc/sys/fs/file-max) on most devices it is well over 50K.



来源:https://stackoverflow.com/questions/13262339/can-anyone-confirm-this-issue-limited-number-of-file-descriptors-on-some-androi

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!