Skip to content

bpo-1635741: Remove redundant _Py_INC_TPALLOCS in _Py_NewReference() - #17883

Closed
shihai1991 wants to merge 1 commit into
python:masterfrom
shihai1991:bpo_1635741_2
Closed

bpo-1635741: Remove redundant _Py_INC_TPALLOCS in _Py_NewReference()#17883
shihai1991 wants to merge 1 commit into
python:masterfrom
shihai1991:bpo_1635741_2

Conversation

@shihai1991

@shihai1991 shihai1991 commented Jan 7, 2020

Copy link
Copy Markdown
Member
@shihai1991

shihai1991 commented Jan 7, 2020

Copy link
Copy Markdown
Member Author

Check test_asyncio test case's failure:

(Pdb) gettotalrefcount()
-7737240
(Pdb) refs_before
-7709437
(Pdb) gettotalrefcount()-refs_before
-28019

in master branch:

(Pdb) gettotalrefcount()
505358
(Pdb) refs_before
497062
(Pdb) gettotalrefcount()-refs_before
8297

Looks like that _Py_INC_TPALLOCS in _Py_NewReference() and this PR should be closed.
Compare to _Py_ForgetReference(), I don't know why _Py_NewReference() need _Py_INC_TPALLOCS. Do you know the reason? @vstinner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants