News for hackers. Stuff that matters.
Re:What’s New In Python 3.6 by lqdc13 on Friday December 09, 2016 @02:45AM (#13137340)
sys.getsizeof() on a code object returns the size of the code struct, not all the other objects it references.

To measure real usage, you have to use another method. I use ipython_memory_usage because it's easy to use.

You can test this out easily by making a large dict and see how much your OS thinks python is using vs what sys.getsizeof is reporting.

There are no comments on this comment yet.