summaryrefslogtreecommitdiff
path: root/patchtracker/Util.py
blob: 31a200ccdc6dc17196939ab96abcdca117ba1bbd (plain)
1
2
3
4
5
6
7
8
9

import resource
import sys

def print_used_memory(msg):
	"""Small utility function to find where RAM is used at most."""
	r = resource.getrusage(resource.RUSAGE_SELF)
	print >> sys.stderr,  "%s; used memory = %d" % (msg, r.ru_maxrss)