I'm profiling my Python program, I'd like to know how much memory it's using and if there's any way I can clear it out, I notice that it's using a lot of rss memory, the way I do the profiling is this:
p = psutil.Process(os.getpid())
print p.get_memory_info()
I noticed that the rss memory used increases dramatically after I call a few functions, and I'd like to delete the variables after I'm done. How can I do so that rss memory clears out? But if I do:
p = psutil.Process(os.getpid())
print p.get_memory_info()
ll = []
ll.append(ll)
print p.get_memory_info()
There is no memory allocated in rss.
What exactly gets put in the rss? And any way I can clear it out? Is it safe to do so?