Forums

How can I make sure my console stays under the 3GB memory limit?

Hi, scratching my head here trying to make sure my console is staying under the 3GB limit so it doesn't get closed.

The idea is to split up the generation so that it loads files in batches, remaining under the memory limit.

Right now I'm using psutil.virtual_memory() to do this, though that seems to give wonky values for the available memory usage, as well as the memory used.

There's probably some way I'm missing about how to get the RAM usage for this specific console that I'm missing.

Any suggestions would be appreciated.

Nevermind, tracemalloc solved all my problems.

More info can be found here.