How can I get rid of resident dirty memory in Objective-C?

后端 未结 4 614
渐次进展
渐次进展 2021-01-30 14:46

I watched Apple\'s WWDC 2010 video on Advanced Memory Analysis with Instruments and from that, I was able to find a lot of resident dirty memory. I realize that having so much r

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-30 15:06

    "This is in the "Dirty" category - 32 MB of resident dirty memory..." "I also noticed a 32 MB chunk of VM_ALLOCATE and I'm wondering..."

    I see the same "VM_ALLOCATE (8192 pages) 32 MB" for resident, dirty, and virtual columns in the VM Tracker when I profile my apps in the Simulator.

    For comparison, I've profiled the (smaller) demo apps built from Paul Hegarty's very informative iTunes U Stanford course -- e.g., Psychologist and the Graphing Calculator -- and see the same entry in each.

    I'm a 'domain guy' and don't yet have a strong grasp of the details of memory management, so I can't offer an authoritative explanation, but it seems reasonable to conclude that this allocation is owed to elements of the Framework common to all apps run on the Simulator. (I haven't run them on a device.)

    (FYI: Xcode 4.3 on a MacBook Pro running 10.7.3)

提交回复
热议问题