Feature #15305 ยป 0001-include-ruby-ruby.h-RB_ALLOCV-remove-unnecessary-GC-.patch
include/ruby/ruby.h | ||
---|---|---|
#else
|
||
# define RUBY_ALLOCV_LIMIT 1024
|
||
# define RB_ALLOCV(v, n) ((n) < RUBY_ALLOCV_LIMIT ? \
|
||
(RB_GC_GUARD(v) = 0, alloca(n)) : \
|
||
((v) = 0, alloca(n)) : \
|
||
rb_alloc_tmp_buffer(&(v), (n)))
|
||
# define RB_ALLOCV_N(type, v, n) \
|
||
((type*)(((size_t)(n) < RUBY_ALLOCV_LIMIT / sizeof(type)) ? \
|
||
(RB_GC_GUARD(v) = 0, alloca((size_t)(n) * sizeof(type))) : \
|
||
((v) = 0, alloca((size_t)(n) * sizeof(type))) : \
|
||
rb_alloc_tmp_buffer2(&(v), (long)(n), sizeof(type))))
|
||
#endif
|
||
#define RB_ALLOCV_END(v) rb_free_tmp_buffer(&(v))
|
||
-
|