Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5155eab

Browse files
author
Jeff Whitaker
committed
added macos x support in report_memory function
svn path=/trunk/matplotlib/; revision=3135
1 parent 36a9881 commit 5155eab

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/matplotlib/cbook.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,9 @@ def report_memory(i):
695695
elif sys.platform.startswith('linux'):
696696
a2 = os.popen('ps -p %d -o rss,sz' % pid).readlines()
697697
mem = int(a2[1].split()[1])
698+
elif sys.platform.startswith('darwin'):
699+
a2 = os.popen('ps -p %d -o rss,vsz' % pid).readlines()
700+
mem = int(a2[1].split()[0])
698701

699702
return mem
700703

0 commit comments

Comments
 (0)