Project

General

Profile

« Previous | Next » 

Revision 7e0ae169

Added by shyouhei (Shyouhei Urabe) about 6 years ago

avoid overflow in integer multiplication

This changeset basically replaces ruby_xmalloc(x * y) into
ruby_xmalloc2(x, y). Some convenient functions are also
provided for instance rb_xmalloc_mul_add(x, y, z) which allocates
x * y + z byes.