Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Gem to get Ruby's memory usage in Mac OS X. - WARNING: ONLY EXPERIMENTAL!

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 ext
Octocat-spinner-32 lib
Octocat-spinner-32 README.markdown
Octocat-spinner-32 macmem.gemspec
README.markdown

MacMem

MacMem is a simple gem that gets the current memory usage of your Ruby process in Mac OS X.

Since apparently the only way to get memory usage in Ruby is calling the ps shell command, I built this around proc_pidinfo in an attempt to do things in a cleaner way. My hope is that somebody builds a better, multiplatform Gem for this task.

Beware that my implementation, ableit simple, might be imperfect.

Usage

require 'macmem'

puts macmem   # prints the memory usage in kbytes.
Something went wrong with that request. Please try again.