This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Make GC_Head a compile-time option
Type: enhancement Stage: resolved
Components: Versions: Python 3.11
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: iritkatriel, vstinner, yuriy_levchenko
Priority: normal Keywords:

Created on 2016-01-27 11:08 by yuriy_levchenko, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg259013 - (view) Author: yuriy_levchenko (yuriy_levchenko) Date: 2016-01-27 11:08
I permanently use gc.disable() but CPython create object with GC_Head.
it's use big memory.
I suggest add define to a few file that remove use GC_Head and allocate extra memory.
msg259053 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-01-27 20:03
Could you please try to elaborate a little bit the issue?

> I permanently use gc.disable() but CPython create object with GC_Head.
it's use big memory.

You propose to remove GC_Head for everywhere? Or do you want a configure option?

What do you mean by "big memory"? Do you have an estimation of the "overhead" on an application?
msg260285 - (view) Author: yuriy_levchenko (yuriy_levchenko) Date: 2016-02-14 18:32
I'm going to do this under define, as an option. In my application it consumes several mBs + it's some performance for handling  this structure.
msg391894 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-04-26 10:22
This seems like something that would require a PEP, or at least a discussion on python-ideas.
msg392075 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-04-27 14:17
I only saw yuriy_levchenko's request in 2016, it doesn't sound like a popular request. Disabling completely the GC is an invasive change, the GC is part of the Python semantics. I agree with Irit, this idea should be discussed on python-ideas first. I close this issue.

Note: I moved the PyGC_Head structure to the internal C API in Python 3.9, see bpo-40241.
Date User Action Args
2022-04-11 14:58:26adminsetgithub: 70403
2021-04-27 14:17:07vstinnersetstatus: open -> closed
resolution: rejected
messages: + msg392075

stage: resolved
2021-04-26 10:22:50iritkatrielsetnosy: + iritkatriel
messages: + msg391894
2021-04-26 10:22:01iritkatrielsettype: enhancement
versions: + Python 3.11, - Python 2.7
2016-02-14 18:32:41yuriy_levchenkosetmessages: + msg260285
2016-01-27 20:03:40vstinnersetmessages: + msg259053
2016-01-27 18:13:22brett.cannonsettitle: remove gc from CPython -> Make GC_Head a compile-time option
2016-01-27 11:12:56vstinnersetnosy: + vstinner
2016-01-27 11:08:47yuriy_levchenkocreate