------ extPart_001_0001_01C0B7D6.18833430 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I worked fine on my win2K with SP1 and latest cygwin, with ruby 1.6.2 ----- Original Message ----- From: Dave Thomas Sent: Wednesday, March 28, 2001 4:54 PM To: ruby-talk / ruby-lang.org Subject: [ruby-talk:13289] Re: This is going to sound crazy, but... matz / zetabits.com (Yukihiro Matsumoto) writes: > |If anyone's interested, Andy has isolated this down to about 30 lines > |of code (10 lines of Ruby, and 20 lines of C extension). But before we > |inflict this puzzler on anyone else, we were wondering if anyone had > |seem similar problems under 2000. > > Show me the code. It might not be a Win 2000 problem, but GC problem > which happen to be hidden on other architectures. It sometimes happens. The following blows up under 2000, but runs fine on all other platforms. There's a possibility this may be a C RTS bug: we're downloading 186Mb of service pack right now. Thanks Dave --------------------cut here------------------------------- require "ceres" count=0 ds = IntervalDataSet.new(30000) while count < 30000 puts count ds.value(count).to_s count += 1 GC.start end puts "Exit Normal" --------------------cut here------------------------------- #include "ruby.h" static VALUE cIntervalDataSet; typedef struct { int size; } IDS_Struct; static VALUE ids_new(VALUE class, VALUE pcount) { IDS_Struct *ids; VALUE me; ids = ALLOC(IDS_Struct); me = Data_Wrap_Struct(cIntervalDataSet, 0, free, ids); return me; } static VALUE ids_get_value(VALUE self, VALUE pindex) { return rb_float_new(69.0); } void Init_ceres(void) { cIntervalDataSet = rb_define_class("IntervalDataSet", rb_cObject); rb_define_singleton_method(cIntervalDataSet, "new", ids_new, 1); rb_define_method(cIntervalDataSet, "value", ids_get_value, 1); }<br clear=all><hr>Get your FREE download of MSN Explorer at http://explorer.msn.com<br></p> ------ extPart_001_0001_01C0B7D6.18833430 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <HTML><BODY STYLE="font:10pt verdana; border:none;"><DIV>I worked fine on my win2K with SP1 and latest cygwin, with ruby 1.6.2<BR></DIV> <DIV><BR></DIV> <BLOCKQUOTE style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> <DIV style="FONT: 10pt Arial">----- Original Message -----</DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt Arial; FONT-COLOR: black"><B>From:</B> Dave Thomas</DIV> <DIV style="FONT: 10pt Arial"><B>Sent:</B> Wednesday, March 28, 2001 4:54 PM</DIV> <DIV style="FONT: 10pt Arial"><B>To:</B> ruby-talk / ruby-lang.org</DIV> <DIV style="FONT: 10pt Arial"><B>Subject:</B> [ruby-talk:13289] Re: This is going to sound crazy, but...</DIV> <DIV><BR></DIV>matz / zetabits.com (Yukihiro Matsumoto) writes:<BR><BR>> |If anyone's interested, Andy has isolated this down to about 30 lines<BR>> |of code (10 lines of Ruby, and 20 lines of C extension). But before we<BR>> |inflict this puzzler on anyone else, we were wondering if anyone had<BR>> |seem similar problems under 2000.<BR>><BR>> Show me the code. It might not be a Win 2000 problem, but GC problem<BR>> which happen to be hidden on other architectures. It sometimes happens.<BR><BR>The following blows up under 2000, butuns fine on all other<BR>platforms.<BR><BR>There's a possibility this may be a C RTS bug: we're downloading 186Mb<BR>of service pack right now.<BR><BR>Thanks<BR><BR><BR>Dave<BR><BR><BR><BR>--------------------cut here-------------------------------<BR>require "ceres"<BR><BR>count=0<BR>ds3D IntervalDataSet.new(30000)<BR>while count < 30000<BR> puts count<BR> ds.value(count).to_s<BR> count += 1<BR> GC.start<BR>end<BR>puts "Exit Normal"<BR><BR>--------------------cut here-------------------------------<BR><BR>#include "ruby.h"<BR><BR>static VALUE cIntervalDataSet;<BR><BR>typedef struct {<BR> int size;<BR>} IDS_Struct;<BR><BR>static VALUE ids_new(VALUE class, VALUE pcount)<BR>{<BR> IDS_Struct *ids;<BR> VALUE me;<BR><BR> ids = ALLOC(IDS_Struct);<BR> me = Data_Wrap_Struct(cIntervalDataSet, 0, free, ids);<BR> return me;<BR>}<BR><BR>static VALUE ids_get_value(VALUE self, VALUE pindex)<BR>{<BR> return rb_float_new(69.0);<BR>}<BR><BR><BR>void Init_ceres(void)<BR>{<BR> cIntervalDataSet = rb_define_class("IntervalDataSet", rb_cObject);<BR> rb_define_singleton_method(cIntervalDataSet,new", ids_new, 1);<BR> rb_define_method(cIntervalDataSet, "value", ids_get_value, 1);<BR>}<BR> <DIV></DIV></BLOCKQUOTE></BODY></HTML><DIV><BR><br clear=all><hr>Get your FREE download of MSN Explorer at http://explorer.msn.com<br></p></DIV> ------ extPart_001_0001_01C0B7D6.18833430--