虚拟机内存管理之内存分配器

区块链 创建于:2023-05-28

1. dlmalloc [1]

* Key Points ( salient points )

  • 小内存( Small < 0x100 bytes )

  • 大内存( Large )

  • 超大内存( Huge ) > 64 kb

* Weakness

2. jemalloc ( Android 5.0.0 ~ )

* Key Points ( salient points )

* Summary

3. scudo ( Android 11 ~)

* Key Points ( salient points )

* Summary

4. PartitionAlloc

* Key Points ( salient points )

为了缓解多线程内存分配的数据竞争问题,每个线程的数据缓存区( TLS )保存了少量用于常用中小内存分配的 Slots 。因为这些 Slots 是按线程存储的,所以可以在没有锁的情况下分配它们,并且只需要更快的线程本地存储查找,从而提高进程中的缓存局部性。每个线程的缓存已经过定制以满足大多数请求,通过批量分配和释放第二层的内存,分期锁获取,并在不捕获过多内存的情况下进一步改善局部性。

* Summary

5. Overview

6. Rererence

原文地址:https://my.oschina.net/u/4180867/blog/5572095

免责声明:本文来源于互联网,版权归合法拥有者所有,如有侵权请公众号联系管理员

* 本站提供的一些文章、资料是供学习研究之用,如用于商业用途,请购买正版。

字节跳动终端技术