include/ruby/ruby.h (rb_mul_size_overflow): added to handle mul overflow efficiently.
include/ruby/ruby.h (rb_alloc_tmp_buffer2): use rb_mul_size_overflow and avoid division where it can define DSIZE_T.
gc.c (xmalloc2_size): moved from ruby.h and use rb_mul_size_overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
include/ruby/ruby.h (rb_mul_size_overflow): added to handle
mul overflow efficiently.
include/ruby/ruby.h (rb_alloc_tmp_buffer2): use rb_mul_size_overflow
and avoid division where it can define DSIZE_T.
gc.c (xmalloc2_size): moved from ruby.h and use rb_mul_size_overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e