> the only way to is shell out and scrape the output of ps
All `ps` is doing is reading files in proc. The memory info it prints is in `/proc/$pid/status`. Ruby can trivially read `/proc/self/status` to get that very naive view of how much memory it's using.
That isn't a useful amount of memory because, well, it doesn't actually show where object allocations go.
> Copy on write does definitely help here, only for Ruby > 2.0.
I believe she meant the operating system's copy-on-write of memory. Forking a copy of a process is actually very cheap because it's copy-on-write. That has nothing to do with ruby or its version and has been true in linux for as long as linux has existed.
I really don't understand what you're trying to say or why you mention ps at all.