LoginSignup
50
43

More than 5 years have passed since last update.

XXmallocのメモリ管理アルゴリズムについてわかりやすい記事

Last updated at Posted at 2012-03-16

dlmalloc, tcmalloc, jemallocについて,以下の各記事を読めば各mallocのアルゴリズムはわかるはず.

dlmalloc

Linuxの一部やAndroidのDalvik VMで利用されている.シンプルながらうまく考えられている.
チャンク(連続空き領域1つ)の境界と構造体の境界が違う所が罠.
http://g.oswego.edu/dl/html/malloc.html
http://mkosaki.blog46.fc2.com/blog-entry-241.html にわかりやすい講演資料が,と思ったら動画がprivateになってる…

tcmalloc

thread-caching malloc. Googleで利用されている.
スレッドがキャッシュ持つのでfreeしてもメモリ利用量が減らない!のが罠.
http://goog-perftools.sourceforge.net/doc/tcmalloc.html

jemalloc

Facebookが高速化やモニタ機能追加などの改良を加えて利用している.キャッシュ構造を頑張ってる印象
https://www.facebook.com/note.php?note_id=480222803919
追加: 和訳 by @repeatedly: http://d.hatena.ne.jp/repeatedly/20110110/1294634486
論文: https://docs.google.com/viewer?url=http://www.unixhowto.de/docs/jemalloc.pdf&pli=1

50
43
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
50
43