Skip to content
  • 卜部昌平's avatar
    51da92ea
    * vm.c (ruby_vm_at_exit): new API. This enables extension libs to · 51da92ea
    卜部昌平 authored
    	  hook a VM termination.  Right now, because the VM we have is
    	  process global, most extensions do not deallocate resources and
    	  leave them to Operating System's reaping userland processes.  But
    	  in a future we plan to have multiple VMs to run simultaneously in
    	  a single process (MVM project).  At that stage we can no longer
    	  rely on OSes and have to manage every resources to be reclaimed
    	  properly.  So it is.  For a forward-compatibility reason this API
    	  is introduced now, encouraging you to be as gentle as you can for
    	  your resources; that is, tidy up your room.
    
    	* include/ruby/vm.h: ditto.
    
    	* vm_core.h (rb_vm_struct): new field.
    
    	* vm.c (vm_init2): initialize above new field.
    
    	* eval.c (ruby_cleanup): trigger those hooks.
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
    51da92ea
    * vm.c (ruby_vm_at_exit): new API. This enables extension libs to
    卜部昌平 authored
    	  hook a VM termination.  Right now, because the VM we have is
    	  process global, most extensions do not deallocate resources and
    	  leave them to Operating System's reaping userland processes.  But
    	  in a future we plan to have multiple VMs to run simultaneously in
    	  a single process (MVM project).  At that stage we can no longer
    	  rely on OSes and have to manage every resources to be reclaimed
    	  properly.  So it is.  For a forward-compatibility reason this API
    	  is introduced now, encouraging you to be as gentle as you can for
    	  your resources; that is, tidy up your room.
    
    	* include/ruby/vm.h: ditto.
    
    	* vm_core.h (rb_vm_struct): new field.
    
    	* vm.c (vm_init2): initialize above new field.
    
    	* eval.c (ruby_cleanup): trigger those hooks.
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Loading