diff options
author | Artem Yunusov <nedrlab@gmail.com> | 2008-08-24 00:24:20 +0500 |
---|---|---|
committer | Artem Yunusov <nedrlab@gmail.com> | 2008-08-24 00:24:20 +0500 |
commit | 9eab105464c3aa938feea043fdac19ddb6e224cd (patch) | |
tree | 087ad52da4224e841a9671e9bc5b1a6431457e5d | |
parent | 6d25b176b81d976f571cb9e83686e399d1bcbe1d (diff) | |
download | markdown-9eab105464c3aa938feea043fdac19ddb6e224cd.tar.gz markdown-9eab105464c3aa938feea043fdac19ddb6e224cd.tar.bz2 markdown-9eab105464c3aa938feea043fdac19ddb6e224cd.zip |
Fixed memory measure for MacOS.
-rw-r--r-- | test-markdown.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test-markdown.py b/test-markdown.py index ee79afa..e3a55b8 100644 --- a/test-markdown.py +++ b/test-markdown.py @@ -1,4 +1,4 @@ -import os, difflib, time, gc, codecs +import os, difflib, time, gc, codecs, platform from pprint import pprint import textwrap @@ -12,7 +12,10 @@ ACTUALLY_MEASURE_MEMORY = True ###################################################################### -_proc_status = '/proc/%d/status' % os.getpid() +if platform.system().lower() == "darwin": # Darwin + _proc_status = '/proc/%d/stat' % os.getpid() +else: # Linux + _proc_status = '/proc/%d/status' % os.getpid() _scale = {'kB': 1024.0, 'mB': 1024.0*1024.0, 'KB': 1024.0, 'MB': 1024.0*1024.0} |