2

现在,我知道我的应用程序使用了很多图形,但不是 60mb 的图形。但是,Instruments 显示该应用程序在启动后就使用了 60+mb 的虚拟内存。编译后的应用程序有 24mb 大,我们说的是启动后空闲的欢迎屏幕;知道为什么 VM 大小可能会这么大吗?

4

2 回答 2

1

The virtual memory is the address space allocated by your app from calls like malloc. This does not mean that it uses this much physical memory. For example, all libraries (libSystem, ...) that your app links to are allocated in shared memory, which is part of your virtual memory.

A good explanation of memory types can be found in the help of the "Activity Monitor" application. There's also a great blog post from Mike Ash.

于 2009-06-21T17:33:41.843 回答
0

您如何/何时加载图像?

我猜测一下,60MB 是您的应用程序的大小,其中包含未压缩的图像。

于 2009-06-21T09:20:23.790 回答