活动监视器仪器 ios

发布于 2024-11-29 19:28:42 字数 237 浏览 1 评论 0原文

我注意到活动监视器的使用与工具中的分配不相关。我知道这是因为分配并没有考虑很多事情。

我想知道 1 个应用程序实际应该使用多少内存。即什么被认为是合理的?在分配工具中,我的应用程序以 2.0mb 堆运行。在内存监视器中,有时会达到 50 的峰值,然后又回落到 40。这正常吗?我知道iphone有128mb/256mb。对于一个简单的应用程序来说 40 MB 不是很多吗,因为 safari 似乎只使用 35 MB 堆。

谢谢。

i noticed that the activity monitor usage doesn't correlate with the allocations in instruments. I understand that this is due to the fact that allocations doesn't factor in a lot of things.

I was wondering how much memory should 1 app really use. I.e what is considered reasonable? In the allocations tool, my app is running at 2.0mb heap . In the memory monitor it sometimes peak to 50 before falling back to 40. Is that normal ? I understand that the iphone's have 128mb/256mb. Isn't 40 mb quite a lot for a simple app since safari seems to be using only 35mb heap.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

柠檬 2024-12-06 19:28:42

它看起来确实相当高,但这取决于您的应用程序在这些峰值出现时执行的操作。您正在加载大量图形吗?声音?

也许您可以提供更多有关您的应用程序的功能以及这些峰值何时出现的信息

it does seem pretty high, but that depends on what actions your app performs when these peaks appear. Are you loading in a lot of graphics? sound?

Maybe you can give a little more information as to what your app does, and when these peaks appear

温暖的光 2024-12-06 19:28:42

图像通常存储在仪器无法计数的某个位置。你只能看到 CGImageRef 等的一个小句柄。Apple 需要更新 Instruments(这需要相当大的修改……)才能包含这样的内存。

EG:以 4 字节/像素加载 1000 像素 x 1000 像素图像 ==> 4MB,但您会在某些 CGimageRef 或类似的地方看到 50 字节。因此还要计算 CGImageRefs。

Images are usually stored in some place that does not get counted by instruments. You only see a small handle to the CGImageRef, etc. Apple needs to update Instruments (it would take quite a hack..) to also include memory like this.

EG: Load 1000px by 1000 px image at 4 bytes/px ==> 4MB, but you will see 50 bytes for some CGimageRef, or similar somewhere. So also count the CGImageRefs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文