ios Memory Usage Performance Guidelines

141 篇文章 1 订阅
85 篇文章 1 订阅

Introduction

Memory is an important system resource that all programs use. Programs must be loaded into memory before they can run and, while running, they allocate additional memory (both explicitly and implicitly) to store and manipulate program-level data. Making room in memory for a program’s code and data requires time and resources and therefore affect the overall performance of the system. Although you cannot avoid using memory altogether, there are ways to minimize the impact your memory usage has on the rest of the system.

This document provides background information about the memory systems of OS X and iOS and how you use them efficiently. You can use this information to tune your program’s memory usage by ensuring you are allocating the right amount of memory at the right time. This document also provides tips on how to detect memory-related performance issues in your program.

Organization of This Document

This programming topic includes the following articles:

  • About the Virtual Memory System introduces the terminology and provides a high-level overview of the virtual memory systems of OS X and iOS.

  • Tips for Allocating Memory describes the best techniques for allocating, initializing, and copying memory. It also describes the proper ways to respond to low-memory notifications in iOS.

  • Caching and Purgeable Memory discusses the benefits of caching, and how to avoid some of the problems that can arise from implementing caches. It also details the advantages of implementing purgeable memory into a caching system and how to successfully implement this beneficial technology.

  • Tracking Memory Usage describes the tools and techniques for analyzing your application’s memory usage.

  • Finding Memory Leaks describes the tools and techniques for finding memory leaks in your application.

  • Enabling the Malloc Debugging Features describes the environment variables used to enable malloc history logging. You must set some of these variables before using some of the memory analysis tools.

  • Viewing Virtual Memory Usage describes the tools and techniques for analyzing your application’s in-memory footprint.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值