Boehm GC

A garbage collector for C and C++

http://www.hpl.hp.com/personal/Hans_Boehm/gc/

資料

ガベージコレクションのアルゴリズムと実装
中村 成洋 相川 光
秀和システム
売り上げランキング: 19175
おすすめ度の平均: 3.5
2 擬似コードのバグは見て見ぬふり
5 GCの入門書として今のところ最強!

http://homepage2.nifty.com/aito/gc/gc.html

http://www.namikilab.tuat.ac.jp/~sasada/prog/boehmgc.html

http://www.nslabs.jp/boehmgc.rhtml

簡単Boehm GCによるC/C++メモリリーク検知

Ubuntu 9.04

コンパイルが通ることの確認のみ。

$ sudo apt-get libgc-dev
/* gc_test.c */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <gc.h>
int main (int argc, char** argv)
{
  char *buf = GC_malloc_atomic(100);
  strcpy(buf, "hoge");
  printf("%s\n", buf);
  return 0;
}
$ gcc gc_test.c -I/usr/include/gc -L/usr/lib -lgc
$ ./a.out

cygwin

setup.exe で libgc を入れる。

http://cygwin.com/packages/libgc/libgc-6.4-1

boehm_gc.txt · 最終更新: 2010/09/02 13:27 (外部編集)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0