File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ extern "C" {
88# error "this header requires Py_BUILD_CORE define"
99#endif
1010
11+ #define _PyGC_PREV_SHIFT 2
12+ #define _PyGC_PREV_MASK (((uintptr_t) -1) << _PyGC_PREV_SHIFT)
13+
1114/* GC information is stored BEFORE the object structure. */
1215typedef struct {
1316 // Tagged pointer to next object in the list.
@@ -18,7 +21,7 @@ typedef struct {
1821 // Lowest two bits are used for flags documented later.
1922 // Those two bits are made available by the struct's minimum alignment.
2023 uintptr_t _gc_prev ;
21- } PyGC_Head Py_ALIGNED (4 );
24+ } PyGC_Head Py_ALIGNED (1 << _PyGC_PREV_SHIFT );
2225
2326#define _PyGC_Head_UNUSED PyGC_Head
2427
@@ -142,9 +145,6 @@ static inline void _PyObject_GC_SET_SHARED(PyObject *op) {
142145*/
143146#define _PyGC_NEXT_MASK_OLD_SPACE_1 1
144147
145- #define _PyGC_PREV_SHIFT 2
146- #define _PyGC_PREV_MASK (((uintptr_t) -1) << _PyGC_PREV_SHIFT)
147-
148148/* set for debugging information */
149149#define _PyGC_DEBUG_STATS (1<<0) /* print collection statistics */
150150#define _PyGC_DEBUG_COLLECTABLE (1<<1) /* print collectable objects */
You can’t perform that action at this time.
0 commit comments