From: nobu.nokada@... Date: 2002-08-15T11:48:13+09:00 Subject: Re: Data_Make_Struct Considered Dangerous? Hi, At Wed, 14 Aug 2002 23:13:11 +0900, Bill Tj wrote: > --------------------------------------------------- > > It sounds strange. Data_Make_Struct() fills the allocated > > structure with 0 and rb_gc_mark() ignores 0 which is equal to > > Qfalse. > --------------------------------------------------- > I think this can only happen when we have a struct/class inside > another struct/class. What I observed is, while we are creating the > inner struct/class, gc gets called and try to mark the outer > struct/class. Are you saying that even in this case it is safe > because the outer struct/class should all be filled with zeros? Yes, I guess so. > Based on your response above, are you saying that this > "double-initializing" is actually not needed? (in which case, the > error is actually generated somewhere else?) It should be in Data_Make_Struct(). > I just need some > assertion here, because I cannot fix something that is working or > considered working. I can't say anything more unless see your real code. > 1) The calling of marking functions is a kind of waste for objects > that have full life (until the process itself is killed) or long > duration. This kind of objects should not be managed by gc; instead > they should be managed by C. > > 2) It makes it difficult to do real-time programming (I have seen > a discussion on this in this newsgroup.) I see, it's interesting but another story. -- Nobu Nakada