タグ

Linuxとメモリに関するadvblogのブックマーク (3)

  • Gentoo Tab Completion

    Introduction Linux offers users various distributions that they can install and utilize as an alternative to Windows. Choosing a distribution to use can be difficult for a user that has specific needs. Some users may be comfortable with using the Zorin OS while others may be looking for specific features present only in Kubuntu. Oftentimes, users will have to uninstall unwanted applications from d

    Gentoo Tab Completion
  • アジアのペンギン: mallocで取ったメモリ

    안녕하세요. 오늘 블로그 데뷰하는 kakapapa입니다. こんにちは。今日ブログデビューするkakapapaです。 APUE勉強会で"mallocで取ったメモリのサイズを確認する方法は?"という質問があって調べたところ、linuxでは以下の関数が存在すること見付かりました。 size_t malloc_usable_size(void *__ptr); この関数についてmalloc.hには以下のように説明されていました。 Report the number of usable allocated bytes associated with allocated chunk __ptr. 実際どんな値をリターンするか確認するため、テストプログラムを書いて見ました。 #include <stdio.h> #include <stdlib.h> #include <malloc.h> #de

  • ユメのチカラ: メモリアクセスは遅い

    多くのプログラマにとってメモリアクセスの速度を気しなければならない状況というのはめったに無いが、OS、ライブラリ、コンパイラ、RDBMSなどの実装をする時には意識をしなければならない場合がある。 IA-32 Intel Architecture Optimization Reference Manual (order number 248966) をひもとくと6章にOptimizing Cache Usageというのがある。 マイクロベンマークの定番 lmbench http://www.bitmover.com/lmbench/ では、一次キャッシュ(L1)や二次キャッシュ(L2)を測定してくれる。例えば、わたしが利用しているノートだと、L1が1.776nsでL2が5.3490ns、メインメモリアクセスが139.4nsである。 Memory latencies in nanosecond

    advblog
    advblog 2007/09/17
    リストやハッシュはキャッシュに厳しいが配列はキャッシュに優しい。 > 何やら初体験の言い回し。
  • 1