(ruby-core:18872の翻訳)
Title: [RIP] Guy Decoux.
こんにちわ。
2008年7月のはじめにGuy Decouxが亡くなりました。 彼の死をみなさんに伝えるのは悲しいことです。53歳でした。
--- | |
#slide.rab | |
= ((' ')) | |
: allotted-time | |
30m | |
: theme | |
nari-ext | |
--- | |
# ext.rb |
diff --git a/gc.c b/gc.c | |
index 0f84e22..8efd053 100644 | |
--- a/gc.c | |
+++ b/gc.c | |
@@ -393,6 +393,7 @@ typedef struct rb_objspace { | |
struct gc_list *global_list; | |
size_t count; | |
int gc_stress; | |
+ int gc_disable_lazy_sweep; | |
} rb_objspace_t; |
% cat /tmp/a.rb | |
base_length = GC.stat[:heap_length] | |
(base_length * 10000).times{ 'a' } | |
GC.start | |
if GC.stat[:heap_length] == base_length | |
p heap_length: GC.stat[:heap_length], base_length: base_length | |
p 'success' | |
exit 0 | |
else | |
p heap_length: GC.stat[:heap_length], base_length: base_length |
= 桐島、((*Ruby*))やめるってよ | |
: author | |
nari/@nari3/authorNari | |
: institution | |
ネットワーク応用通信研究所 | |
: content-source | |
#odrk03 | |
: date | |
2013/3/16 |
(ruby-core:18872の翻訳)
Title: [RIP] Guy Decoux.
こんにちわ。
2008年7月のはじめにGuy Decouxが亡くなりました。 彼の死をみなさんに伝えるのは悲しいことです。53歳でした。
diff --git a/src/gc.c b/src/gc.c | |
index 66f2bf0..064e050 100644 | |
--- a/src/gc.c | |
+++ b/src/gc.c | |
@@ -1143,13 +1143,8 @@ static void | |
change_gen_gc_mode(mrb_state *mrb, mrb_int enable) | |
{ | |
if (is_generational(mrb) && !enable) { | |
- if (is_major_gc(mrb)) { | |
- advance_phase(mrb, GC_STATE_NONE); |
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func Sqrt(x float64) (z float64) { | |
z = 1.0 | |
prez := float64(0) |
diff --git a/array.c b/array.c | |
index 2454b99..57673b7 100644 | |
--- a/array.c | |
+++ b/array.c | |
@@ -379,11 +379,12 @@ ary_alloc(VALUE klass) | |
static VALUE | |
empty_ary_alloc(VALUE klass) | |
{ | |
+ VALUE ary = ary_alloc(klass); | |
if(RUBY_DTRACE_ARRAY_CREATE_ENABLED()) { |
diff --git a/gc.c b/gc.c | |
index 63869a0..a698792 100644 | |
--- a/gc.c | |
+++ b/gc.c | |
@@ -1499,11 +1499,16 @@ rb_objspace_call_finalizer(rb_objspace_t *objspace) | |
RVALUE *p, *pend; | |
RVALUE *final_list = 0; | |
size_t i; | |
+ rb_thread_t *th = GET_THREAD(); | |