Memory profiling routines for Ruby 2.5+