Skip to content

Instantly share code, notes, and snippets.

@mr-sudaca
Last active December 24, 2015 12:49
Show Gist options
  • Save mr-sudaca/6800022 to your computer and use it in GitHub Desktop.
Save mr-sudaca/6800022 to your computer and use it in GitHub Desktop.
after_use
#!/usr/bin/env bash
after_use_hooks=($(
find "${rvm_path:-"$HOME/.rvm"}/hooks" -iname 'after_use_*' -type f
))
for after_use_hook in "${after_use_hooks[@]}"
do
if [[ -x "${after_use_hook}" ]]
then
. "${after_use_hook}"
fi
done
case "$rvm_ruby_string" in
*ree*|*ruby-1.9.*)
export RUBY_HEAP_MIN_SLOTS=2000000
export RUBY_HEAP_SLOTS_INCREMENT=1000000
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
export RUBY_GC_MALLOC_LIMIT=1000000000
export RUBY_HEAP_FREE_MIN=20000
export RUBY_FREE_MIN=$RUBY_HEAP_FREE_MIN
;;
*)
unset RUBY_HEAP_MIN_SLOTS RUBY_HEAP_SLOTS_INCREMENT RUBY_HEAP_SLOTS_GROWTH_FACTOR RUBY_GC_MALLOC_LIMIT RUBY_HEAP_FREE_MIN RUBY_FREE_MIN
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment