Samuel Williams <space.ship.traveller / gmail.com> wrote:
> If I know that a string is going to be at least X bytes in my native
> extension, is there some way to set the initial capacity to avoid
> memory allocations?

rb_str_resize, it's documented in doc/extension.rdoc

Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>