Skip to content

Commit 082df23

Browse files
author
linbinquan
committed
fix #4865
1 parent a5c2b49 commit 082df23

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Reports/2025/#321-2025.01.20.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,20 @@
4949

5050
[@JonyFang](https://github.com/jonyfang): 在 SwiftUI 开发中,Xcode Preview 常出现崩溃或卡死问题,如果不了解其工作原理,通常只能用清除缓存、重启 Xcode 等方法解决。作者通过将 DerivedData 文件夹加入 Git 管理,观察其变化来研究 Preview 原理。其运行机制上,Xcode 16 起 Build and Run 与 Preview 共享构建产物,Preview 用 JIT 方式运行且有特殊预处理过程。Preview 有 Small、Middle、Large 三种重构建策略,依源代码修改程度决定范围与刷新方式。与 Flutter 的 Hot Reload 相比 Xcode Preview 的表现逊色,不支持断点调试,视图状态会重置,实现更黑盒,但仍期待 Xcode 后续对 Preview 优化。
5151

52+
### 🐕 [Size Matters: An Exploration of Virtual Memory on iOS](https://alwaysprocessing.blog/2022/02/20/size-matters)
53+
54+
[@阿权](https://github.com/bqlin):文章作者发现开启扩展虚拟内存(Extended Virtual Addressing)能够解决调试 App OOM 的问题。文中详细介绍了以下内容:
55+
56+
1. 虚拟内存的原理、作用;
57+
2. iOS 中虚拟内存:
58+
1. iOS 虚拟内存的特殊性:No Page Outs;
59+
2. iOS 虚拟内存空间大小的计算方式;
60+
3. iOS 不同设备进程可用的虚拟地址空间大小;
61+
4. 调试 App 出现 OOM 的原因:除了程序自身的 Mach-O、依赖库占用内存,当需为调试环境预留内存;
62+
5. 通开启扩展虚拟内存(Extended Virtual Addressing)来防止调试出现 OOM。
63+
64+
文章遇到的情况在许多大型项目跑在低端设备上都会经常出现,了解虚拟内存对调试开发都很有帮助。
65+
5266
## 工具
5367

5468
> 开发过程中常用的工具,及一些新工具的介绍

0 commit comments

Comments
 (0)