Reading Gauche/Reading Gauche 0.9/gc/finalize.c/GC_notify_or_invoke_finalizers の変更点



 #setlinebreak(on)
 #topicpath
 *GC_notify_or_invoke_finalizers [#gb9be2a5]
 *概要 [#u68c5d8b]
 ひら終了後、作成予定。
 
  void GC_notify_or_invoke_finalizers(void)
  {
     /* This is a convenient place to generate backtraces if appropriate, */
     /* since that code is not callable with the allocation lock.	 */
  #   if defined(KEEP_BACK_PTRS) || defined(MAKE_BACK_GRAPH)
       static word last_back_trace_gc_no = 1;	/* Skip first one. */
  
       if (GC_gc_no > last_back_trace_gc_no) {
 	word i;
   
  #	ifdef KEEP_BACK_PTRS
 	  LOCK();
   	  /* Stops when GC_gc_no wraps; that's OK.	*/
 	  last_back_trace_gc_no = (word)(-1);  /* disable others. */
 	  for (i = 0; i < GC_backtraces; ++i) {
 	      /* FIXME: This tolerates concurrent heap mutation,	*/
 	      /* which may cause occasional mysterious results.		*/
 	      /* We need to release the GC lock, since GC_print_callers	*/
 	      /* acquires it.  It probably shouldn't.			*/
 	      UNLOCK();
 	      GC_generate_random_backtrace_no_gc();
 	      LOCK();
 	  }
 	  last_back_trace_gc_no = GC_gc_no;
 	  UNLOCK();
  #	endif
  #       ifdef MAKE_BACK_GRAPH
 	  if (GC_print_back_height)
             GC_print_back_graph_stats();
  #	endif
       }
  #   endif
     if (GC_finalize_now == 0) return;
     if (!GC_finalize_on_demand) {
 	(void) GC_invoke_finalizers();
  #	ifndef THREADS
 	  GC_ASSERT(GC_finalize_now == 0);
  #	endif	/* Otherwise GC can run concurrently and add more */
 	return;
     }
     if (GC_finalizer_notifier != (void (*) (void))0
 	&& last_finalizer_notification != GC_gc_no) {
 	last_finalizer_notification = GC_gc_no;
 	GC_finalizer_notifier();
     }
  }
 
 *調べるもの [#lc02b20d]
 -[[Reading Gauche/Reading Gauche 0.9/gc/finalize.c/GC_finalize_now]]
 -[[Reading Gauche/Reading Gauche 0.9/gc/finalize.c/GC_finalize_on_demand]]
 -[[Reading Gauche/Reading Gauche 0.9/gc/finalize.c/GC_invoke_finalizers]]
 -[[Reading Gauche/Reading Gauche 0.9/gc/include/private/gc_priv.h/GC_ASSERT]]
 -[[Reading Gauche/Reading Gauche 0.9/gc/finalize.c/GC_finalizer_notifier]]
 -[[Reading Gauche/Reading Gauche 0.9/gc/finalize.c/last_finalizer_notification]]
 -[[Reading Gauche/Reading Gauche 0.9/gc/alloc.c/GC_gc_no]]
 
 *参照元 [#ga163e67]
 #related
 
 *コメント [#x6de96b6]
 #pcomment(,1000,below,reply)
 

リロード   新規 編集 差分 添付 複製 改名   トップ 一覧 検索 最終更新 バックアップ   ヘルプ   最終更新のRSS

Modified by mona
PukiWiki 1.4.6 Copyright © 2001-2005 PukiWiki Developers Team. License is GPL.
Based on "PukiWiki" 1.3 by yu-ji
Powered by PHP 5.2.17
HTML convert time to 0.061 sec.