From: SASADA Koichi Date: 2014-03-15T18:27:53+09:00 Subject: [ruby-core:61510] Re: [REJECT?] xmalloc/xfree: reduce atomic ops w/ thread-locals (2014/03/15 17:34), Eric Wong wrote: > I wonder if the speedup would be bigger if we use an allocator with > good MT scalability. It is possible. >> > BTW, >> > >>> > > + rb_thread_t *th = ruby_thread_from_native(); >> > >> > `th' can be NULL because no Ruby threads can call this code. > Did you mean: gsub(/no Ruby/, "non-Ruby") ? Yes. > I should put a FATAL exit there (but not much different than crashing). You shouldn't. It should pass. For example, C-method creates another native threads, and they can use ruby_xmalloc(). This is why this is not `rb_xmalloc()' but `ruby_xmalloc()'. -- // SASADA Koichi at atdot dot net