UNNotificationServiceExtension:内存限制? [英] UNNotificationServiceExtension: memory limit?

查看:87
本文介绍了UNNotificationServiceExtension:内存限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实现UNNotificationServiceExtension,但是我的代码似乎经常失败,只是简单地说明

I'm trying to implement UNNotificationServiceExtension, but my code seems to fail often, simply stating the

Program ended with exit code: 0"

我正在尝试在扩展中使用FMDB Sqlite3模块,似乎我可能会遇到扩展内部的内存限制.这些扩展中是否有记录的内存限制?有什么策略可以帮助我将它们考虑在内吗?还是我不得不接受我无法将复杂的功能添加到扩展中?

I am trying to use the FMDB Sqlite3 module in the extension and it seems as though I may be running into memory limits inside the extension. Are there any documented limits for memory in these extensions? Are there any strategies to help me take them into account, or am I just going to have to accept that I can't put complex functionality into the extension?

通过Instruments运行它可以看到它仅达到3.24MB.NSExtensionMain占了其中的68%,所以我认为我不能将它降低很多.

Running it through Instruments shows that it only reaches 3.24MB. And NSExtensionMain is 68% of that, so I don't think I can bring that down by a lot.

推荐答案

截至18年5月18日的限制为12MB.我通过分配过多的内存来验证这一点,并看到内核发出一条控制台消息,指出该进程由于违反了12MB的硬限制而终止.

The limit as of 05/18/18 is 12MB. I verified this by allocating too much memory and saw a Console message from the kernel stating the process was terminated by violating the hard limit of 12MB.

这篇关于UNNotificationServiceExtension:内存限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆