Forum: Ruby Inline C and Memory

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
E8b4b55c5a84aaa4afdfbafde135308d?d=identicon&s=25 Andrew Arrow (andrewfromgeni)
on 2007-06-29 05:53
So the more objects you store in ruby the longer mark and sweep takes
for GC because there are more objects to iterate over.  Makes sense.

If you have a machine with 8 gigs of RAM and want to fill up all the
memory to take advantage of it, can you will Ruby and Inline C?

So, the example Inline C looks like:

require 'rubygems'
require 'inline'

class Example
inline(:C) do |builder|
builder.c "int method_test1() {
int x = 10;
return x;


But would it be possible inside method_test1 to do complex memory
allocation and use all 8 gigs of RAM without all the ruby marking and

This topic is locked and can not be replied to.