mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
update notes to talk about -X showrefcount
This commit is contained in:
parent
3da9fbbe83
commit
ff57aefa97
1 changed files with 5 additions and 3 deletions
|
@ -13,12 +13,14 @@ Py_REF_DEBUG
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Turn on aggregate reference counting. This arranges that extern _Py_RefTotal
|
Turn on aggregate reference counting. This arranges that extern _Py_RefTotal
|
||||||
hold a count of all references, the sum of ob_refcnt across all objects. In a
|
hold a count of all references, the sum of ob_refcnt across all objects.
|
||||||
debug-mode build, this is where the "8288" comes from in
|
Passing ``-X showrefcount`` on the command line causes the interactive
|
||||||
|
interpreter to print the reference count total as well the number of memory
|
||||||
|
blocks allocated after each statement:
|
||||||
|
|
||||||
>>> 23
|
>>> 23
|
||||||
23
|
23
|
||||||
[8288 refs]
|
[8288 refs, 14332 blocks]
|
||||||
>>>
|
>>>
|
||||||
|
|
||||||
Note that if this count increases when you're not storing away new objects,
|
Note that if this count increases when you're not storing away new objects,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue