diff options
author | Eli Bendersky <eliben@gmail.com> | 2015-04-18 07:03:40 -0700 |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2015-04-18 07:03:40 -0700 |
commit | 0874412e612cb327c1452afc8375aed7a18c7531 (patch) | |
tree | 9b4759aa38ccb5be81a1b2ebf94af6cdf0dfd7b4 | |
parent | 00de62cdc817fd1b92dd5d3e38d2a248a1613507 (diff) | |
download | pycparser-0874412e612cb327c1452afc8375aed7a18c7531.tar.gz |
Update CHANGES
Also add some test code for heapy-based profiling
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | z.py | 14 |
2 files changed, 14 insertions, 1 deletions
@@ -9,6 +9,7 @@ be used instead of ``cpp`` for preprocessing. - Pull request #64: support keywords like const, volatile, restrict and static in dimensions in array declarations. + - Reduce memory usage of AST nodes (issue #72). + Version 2.10 (03.08.2013) @@ -75,6 +75,17 @@ class NodeVisitor(object): self.current_parent = oldparent +def heapyprofile(): + from guppy import hpy + import gc + + hp = hpy() + ast = parse_file('/tmp/197.c') + gc.collect() + h = hp.heap() + print h + + def memprofile(): import resource import tracemalloc @@ -98,7 +109,8 @@ if __name__ == "__main__": } ''' - memprofile() + #memprofile() + heapyprofile() #parser = CParser() #ast = parser.parse(source_code, filename='zz') |