wedesoft / malloc

Raw memory allocations for Ruby
http://wedesoft.github.com/malloc/
Other
12 stars 2 forks source link

Support for rubinius #1

Closed wjbuys closed 13 years ago

wjbuys commented 13 years ago

I'm trying to get hornetseye working under rubinius as an experiment. Since rubinius's VM is supposed to be pretty fast, I thought it might be worth trying some computationally intensive tasks.

Obviously, memory management works quite differently, so I did not expect it to work out of the box:

$ irb
>> require 'malloc'
LoadError::InvalidExtensionError: Could not open library /home/jacob/.rvm/gems/rbx-2.0.0-pre/gems/malloc-
1.4.0/ext/malloc.so - /home/jacob/.rvm/gems/rbx-2.0.0-pre/gems/malloc-1.4.0/ext/malloc.so: undefined symbol: _Z5XFREEPv
   from Rubinius::NativeMethod.load_extension at kernel/common/native_method.rb:26
   from Rubinius::CodeLoader#load_library at kernel/delta/codeloader.rb:163
   from Rubinius::CodeLoader#require at kernel/common/codeloader.rb:41
   from Rubinius::CodeLoader.require at kernel/common/codeloader.rb:143
   from Kernel(Object)#gem_original_require (require) at kernel/common/kernel.rb:783
   from Kernel(Object)#require at /home/jacob/.rvm/rubies/rbx-2.0.0-pre/site/rubygems/custom_require.rb:59
   from { } in Object#irb_binding at (irb):1
   from Rubinius::BlockEnvironment#call_on_instance at kernel/common/block_environment.rb:72

Is there any way to achieve rubinius compatibility? Is Malloc even necessary when running on the VM?

wedesoft commented 13 years ago

I'm sorry, but I haven't added support for Ruby VMs other than the original Ruby 1.8 and Ruby 1.9 (MRI).