Skip to content

Instantly share code, notes, and snippets.

@cghawthorne
Created May 25, 2010 03:47
Show Gist options
  • Save cghawthorne/412737 to your computer and use it in GitHub Desktop.
Save cghawthorne/412737 to your computer and use it in GitHub Desktop.
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
int main(int argc, char* argv[]) {
setenv("RUBY_HEAP_MIN_SLOTS", "650000", 0);
setenv("RUBY_GC_MALLOC_LIMIT", "50000000", 0);
// Optional GC logging
//setenv("RUBY_GC_STATS", "1", 0);
//char log[100];
//snprintf(log, 100, "/tmp/ruby_gc_%d.txt", getpid());
//setenv("RUBY_GC_DATA_FILE", log, 0);
execv("/opt/ruby-enterprise-1.8.7-nnn/bin/ruby.real", argv);
fprintf(stderr, "Ruby Wrapper: error starting real ruby: %s\n", strerror(errno));
return(EXIT_FAILURE);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment