Debugging out-of-memory crashes in Python
You run your program, and it crashes—it’s out of memory:
- If you’re lucky, you get a
MemoryError
exception.- If you’re less lucky, you get a coredump.
- If you’re having a bad day, your computer locks up and you need to restart it.
How do you figure out what is using up all your Python program’s memory?
Source: Debugging out-of-memory crashes in Python, an article by Itamar Turner-Trauring.