Project

General

Profile

« Previous | Next » 

Revision cda7250d

Added by ko1 (Koichi Sasada) over 11 years ago

  • gc.c (vm_malloc_size): added.
    return malloc_usable_size() if possible.
  • gc.c (MALLOC_ALLOCATED_SIZE): add new setting macro to enable
    GC.allocated_size.
    If platform supports `malloc_usable_size()' (or similar one),
    GC.allocated_size can be implemented with this function.
    Default is 0.
  • gc.c (vm_xmalloc, vm_xrealloc, vm_xfree): use vm_malloc_size()
    to detect collect allocated size.
  • gc.c (vm_malloc_increase): refactoring.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e