Rewrite the memory profile.

We now use sys.getsizeof to consider the actual object size,
rather than simply the number of objects that exist.