On Sat, Nov 20, 2021 at 10:09 AM Marco Sulla <marco.sulla.pyt...@gmail.com> wrote:
> I know how to check the refcounts, but I don't know how to check the > memory usage, since it's not a program, it's a simple library. Is > there not a way to check inside Python the memory usage? I have to use > a bash script (I'm on Linux)? > ps auxww ...can show you how much memory is in use for the entire process. It's commonly combined with grep, like: ps auxww | head -1 ps auxww | grep my-program-name Have a look at the %MEM, VSZ and RSS columns. But being out of memory doesn't necessarily lead to a segfault - it can (EG if a malloc failed, and some C programmer neglected to do decent error checking), but an OOM kill is more likely. -- https://mail.python.org/mailman/listinfo/python-list