[前][次][番号順一覧][スレッド一覧]

ruby-changes:13956

From: nobu <ko1@a...>
Date: Sat, 14 Nov 2009 08:40:48 +0900 (JST)
Subject: [ruby-changes:13956] Ruby:r25762 (mvm): * vm.c (rb_vm_mark, vm_memsize): ignore other VM.

nobu	2009-11-14 08:40:34 +0900 (Sat, 14 Nov 2009)

  New Revision: 25762

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25762

  Log:
    * vm.c (rb_vm_mark, vm_memsize): ignore other VM.

  Modified files:
    branches/mvm/ChangeLog
    branches/mvm/vm.c

Index: mvm/ChangeLog
===================================================================
--- mvm/ChangeLog	(revision 25761)
+++ mvm/ChangeLog	(revision 25762)
@@ -1,5 +1,7 @@
-Sat Nov 14 08:39:28 2009  Nobuyoshi Nakada  <nobu@r...>
+Sat Nov 14 08:40:32 2009  Nobuyoshi Nakada  <nobu@r...>
 
+	* vm.c (rb_vm_mark, vm_memsize): ignore other VM.
+
 	* vm.c (rb_vm_initialize): add last NULL.
 
 Sat Nov 14 03:49:07 2009  Nobuyoshi Nakada  <nobu@r...>
Index: mvm/vm.c
===================================================================
--- mvm/vm.c	(revision 25761)
+++ mvm/vm.c	(revision 25762)
@@ -1440,11 +1440,11 @@
 rb_vm_mark(void *ptr)
 {
     int i;
+    rb_vm_t *vm = ptr;
 
     RUBY_MARK_ENTER("vm");
     RUBY_GC_INFO("-------------------------------------------------\n");
-    if (ptr) {
-	rb_vm_t *vm = ptr;
+    if (vm && vm == GET_VM()) {
 	if (vm->living_threads) {
 	    st_foreach(vm->living_threads, vm_mark_each_thread_func, 0);
 	}
@@ -1516,9 +1516,9 @@
 static size_t
 vm_memsize(const void *ptr)
 {
-    if (ptr) {
-	const rb_vm_t *vmobj = ptr;
-	return sizeof(rb_vm_t) + st_memsize(vmobj->living_threads);
+    const rb_vm_t *vm = ptr;
+    if (vm && vm == GET_VM()) {
+	return sizeof(rb_vm_t) + st_memsize(vm->living_threads);
     }
     else {
 	return 0;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]