|
Re: Data_Make_Struct Considered Dangerous?: msg#01215lang.ruby.general
Hi, Based on my experience, I will not use ALLOC unless it is necessary because of the Ruby gc overhead. Based on what I have learned, when I write Ruby in C, I will stay away from Ruby gc as far as possible (please also see my response to Guy). Thanks. Regards, Bill ====================================================================== Christian Boos <cboos@xxxxxxxxxxxxxxxxxx> wrote: > my two cents on that issue: >> ptr->data2 = Qnil; >> ptr->data2 = Data_Make_Struct (cInner...); >> .... > To me, this doesn't look funny, this looks just THE right thing to do: > secure already existing data structures reachable from the GC > before possibly triggering the GC. > Maybe some more information about this issue in README.ext wouldn't hurt, > but I don't want a restricted, "safer" C API. > For instance, ALLOC is an useful wrapper on top of malloc, > because if needed, it can free memory by triggering a GC. > -- Christian
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Data_Make_Struct Considered Dangerous?, William Djaja Tjokroaminata |
|---|---|
| Next by Date: | Re: Data_Make_Struct Considered Dangerous?, ts |
| Previous by Thread: | RE: Data_Make_Struct Considered Dangerous?, Christian Boos |
| Next by Thread: | ANN: JRuby beta 1.6/0.5.1, Anders Bengtsson |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |