[Rubinius-question] GC-related

M

Michael Neumann

Hi,

BTW, is there a Rubinius related mailing list? I couldn't find one!

If not, here is my problem/question:

I've a lot of C++ objects, and wrap them in Ruby objects (just like
every C/C++ extension does using Data_Wrap_Struct). This creates the
same amount of Ruby objects of course. I'd love to avoid this overhead
by allocating a few more bytes for the C++ object to then "embed" the
Ruby object into the C++ object (or vice versa). But that doesn't work
with MRI/Ruby, because the GC assumes the allocated memory to be within
a well known memory frame and of a special size or aligned, mainly due
to reducing overhead when doing a conservative cycle (or that's how I
understand it).

How is it done in Rubinius? Is it possible to allocate any number of
bytes per Ruby object? In-line?

Thanks in advance, and Merry Christmas!

Regards,

Michael
 
H

hemant

Hi Michael,

Hi,

BTW, is there a Rubinius related mailing list? I couldn't find one!

There you go!

http://groups.google.com/group/rubinius-dev?hl=en
If not, here is my problem/question:

I've a lot of C++ objects, and wrap them in Ruby objects (just like
every C/C++ extension does using Data_Wrap_Struct). This creates the
same amount of Ruby objects of course. I'd love to avoid this overhead
by allocating a few more bytes for the C++ object to then "embed" the
Ruby object into the C++ object (or vice versa). But that doesn't work
with MRI/Ruby, because the GC assumes the allocated memory to be within
a well known memory frame and of a special size or aligned, mainly due
to reducing overhead when doing a conservative cycle (or that's how I
understand it).

How is it done in Rubinius? Is it possible to allocate any number of
bytes per Ruby object? In-line?

Thanks in advance, and Merry Christmas!

Regards,

Michael



--
Let them talk of their oriental summer climes of everlasting
conservatories; give me the privilege of making my own summer with my
own coals.

http://gnufied.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top