1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* gc.c (vm_xrealloc): use the given object space.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-11-13 02:09:33 +00:00
parent 17ccd5d013
commit 29f982738e
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Fri Nov 13 11:09:31 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* gc.c (vm_xrealloc): use the given object space.
Fri Nov 13 00:46:24 2009 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* lib/cgi/util.rb (CGI::pretty): fix the overflow bug

4
gc.c
View file

@ -683,7 +683,7 @@ vm_xrealloc(rb_objspace_t *objspace, void *ptr, size_t size)
if ((ssize_t)size < 0) {
negative_size_allocation_error("negative re-allocation size");
}
if (!ptr) return ruby_xmalloc(size);
if (!ptr) return vm_xmalloc(objspace, size);
if (size == 0) {
vm_xfree(objspace, ptr);
return 0;
@ -776,7 +776,7 @@ void
ruby_xfree(void *x)
{
if (x)
vm_xfree(&rb_objspace, x);
vm_xfree(&rb_objspace, x);
}