最終更新:ID:D7J/gPk67w 2009年02月08日(日) 13:05:33履歴
/* FIXME should rename to [caml_oldify_young_roots] and synchronise with asmrun/roots.c */
名前をcaml_oldify_young_rootsに変更し、asmrun/roots.cと同期させること。
/* Call [caml_oldify_one] on (at least) all the roots that point to the minor heap. */
新世代のヒープ領域を指しているすべてのルートについて、caml_oldify_oneを呼び出す。
void caml_oldify_local_roots (void) { register value * sp; struct caml__roots_block *lr; intnat i, j; /* The stack */ for (sp = caml_extern_sp; sp < caml_stack_high; sp++) {
仮想機械のスタックを走査する。
caml_oldify_one (*sp, sp);
} /* Local C roots */ /* FIXME do the old-frame trick ? */ for (lr = caml_local_roots; lr != NULL; lr = lr->next) {
マシンスタック中にあるポインタを走査する。
for (i = 0; i < lr->ntables; i++){ for (j = 0; j < lr->nitems; j++){ sp = &(lr->tables[i][j]); caml_oldify_one (*sp, sp); } } } /* Global C roots */ caml_scan_global_young_roots(&caml_oldify_one);
/* Finalised values */ caml_final_do_young_roots (&caml_oldify_one);
/* Hook */ if (caml_scan_roots_hook != NULL) (*caml_scan_roots_hook)(&caml_oldify_one);
}
タグ
コメントをかく