← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 3086.a.2.d

内存压力放大分配与GC

理解等级:中级

接近内存容量边缘、对象分配过多或长期对象结构复杂时,分配与GC成本会增大。可用分析器检查对象分配与存活,及早释放、改善数据结构、减少分配,必要时加内存或把冷数据移到盘。堆外内存会把更多管理责任交给实现者,不应只是为了隐藏GC数字而引入。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 理解性能的心智模型 · 查看原书依据

      Optimizing memory may include new algorithms and data structures, freeing up data early and optimizing allocations. State-of-the-art profilers have several views that help us with memory optimizations. Also, GC overhead can become excessive when the system creates too many objects or the object graphs are too complicated, which we can analyze using the object allocations view of the profiler. We can fix this issue by simplifying long-living data structures or taking over GC by using off-heap memory allocation.

    参考来源

    - 位置:《Software Architecture and Decision-Making》第3章《理解性能的心智模型》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch03.xhtml) - 结论依据:原文的定义、比较或例子支持“接近内存容量边缘、对象分配过多或长期对象结构复杂时,分配与GC成本会增大”;正文据此说明用途和边界。 - 原始内容:Optimizing memory may include new algorithms and data structures, freeing up data early and optimizing allocations. State-of-the-art profilers have several views that help us with memory optimizations. Also, GC overhead can become excessive when the system creates too many objects or the object graphs are too complicated, which we can analyze using the object allocations view of the profiler. We can fix this issue by simplifying long-living data structures or taking over GC by using off-heap memory allocation.