Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #32663 > unrolled thread
| Started by | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| First post | 2012-11-02 21:47 +0000 |
| Last post | 2012-11-02 21:47 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Memory profiling: Python 3.2 Antoine Pitrou <solipsis@pitrou.net> - 2012-11-02 21:47 +0000
| From | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| Date | 2012-11-02 21:47 +0000 |
| Subject | Re: Memory profiling: Python 3.2 |
| Message-ID | <mailman.3224.1351892880.27098.python-list@python.org> |
Andrew Robinson <andrew3 <at> r3dsolutions.com> writes: > > When Python3.2 is running, is there an easy way within Python to capture > the *total* amount of heap space the program is actually using (eg:real > memory)? I'm not sure what you mean with "real memory" or how precise you want that measurement to be, but you could try http://www.selenic.com/smem/ (and, within Python, re-use smem's concepts, which shouldn't be too difficult) > And how much of that heap space is allocated to variables ( > including re-capturable data not yet GC'd ) ? Again, not sure what you mean with "allocated to variables" (global variables? local variables? everything?). As for "re-capturable data not yet GC'd", the best way to figure out is to run gc.collect() :-) Regards Antoine.
Back to top | Article view | comp.lang.python
csiph-web