[Bug] Maybe not a bug: on the ios device, the memory has reached the system limit of 50m
swpter opened this issue · comments
Verify steps
- Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
- I have searched on the issue tracker for a related issue.
Version
2.5.1
What OS are you seeing the problem on?
Other
Description
I compiled a framework with gomobile, and then communicated through fd mode. It runs normally on the machine with the m2 chip, but when it runs on the iPhone and ipad, the system console prompts that the maximum memory of 50m has reached the system limit. This may not be a bug. I just want to ask if there is a solution
CLI or Config
TCPSendBufferSize set to 16k
Logs
the console.app shows the network extension reached the limit of 50m
How to Reproduce
cd engine then gomobile bind -target ios/amd64 -v -o tun2socks.xcframework
then use the framework in ios project .
Yeah, it's not a bug. It's common for using go lib/program on iOS devices.
So, there is no solution on ios devices, right? I will close this issue. By the way, is there a stable solution like this library suitable for ios devices?
So, there is no solution on ios devices, right? I will close this issue. By the way, is there a stable solution like this library suitable for ios devices?
I guess there are some rust-based alternatives.
Thanks,the good thing is that it runs normally and stably on macos devices with m2 chips. Perhaps in the future, Apple will expand the maximum memory usage of the network extension to a larger or no limit, then this library can be used. looking forward to this day!
Apple just increased the limit from 15M to 50M last year (or the year before last). So I guess it’s gonna take a while. :-P
15m is too small for network processing. After all, network processing is a high-IO processing process. At the OS level, the memory required by the kernel to process the network is more than 15m. For user mode protocol processing, generally speaking, space is exchanged for time to improve efficiency, and 50m is not enough. It's kind of confusing for Apple to do this