iOS NetworkExtension be killed with memory limit

216 views
Skip to first unread message

hang zhou

unread,
Jun 4, 2021, 11:09:08 AM6/4/21
to golang-nuts
Hi, 
I was use gomobile with go1.16.3 to build a framework for iOS NetworkExtension, but when the extension start, I found the memory it occupied is about 13M, and when we run some goroutine in go, the memory increase and do not decrease, and finally, the system kill my extension with the lmemory imit 15M.
So, I have two questions:
First, if we start the NetworkExtension without our framework, the extension process memory occupation is about 2M, so, is there any way to decrease memory  occupation when we generate the framework by gomobile?
Second, once we start goroutine, the memory increase all the time,  what should I do to release the memory and when?

does anyone can give me some advice or tell me the way to sove these problems?
thanks a lot!

lewgun

unread,
Jun 6, 2021, 9:17:50 PM6/6/21
to golang-nuts
mabye @bradfitz can give you some advise
Reply all
Reply to author
Forward
0 new messages