← 返回首页
bpo-1635741: Remove redundant _Py_INC_TPALLOCS in _Py_NewReference() by shihai1991 · Pull Request #17883 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

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 commented Jan 7, 2020
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

shihai1991 commented Jan 7, 2020
edited
Loading

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

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Footer

© 2026 GitHub, Inc.