Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this to your app/controllers/application_controller.rb | |
# Log GC stats, if enabled (make this the first before_filter) | |
before_filter :before_log_gc_stats | |
# Log GC stats, if enabled (make this the last after_filter) | |
after_filter :after_log_gc_stats | |
def before_log_gc_stats | |
return if (ENV['RUBY_GC_STATS'].nil? or ENV['RUBY_GC_STATS'] != '1') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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); |