CPython optimization: storing reference counters outside of objects
23 May
2011
23 May
'11
6:22 p.m.
Hi,
2011/5/23 Sturla Molden
Instead, we could use multiple heaps:
Each Python thread could manage it's own heap for malloc and free (cf. HeapAlloc and HeapFree in Windows). Objects local to one thread only reside in the locally managed heap.
When an object becomes shared by seveeral Python threads, it is moved from a local heap to the global heap of the process. Some objects, such as modules, would be stored directly onto the global heap.
Does this mean that the PyObject* address would change? How would you update all the places that store moved references? -- Amaury Forgeot d'Arc
4713
Age (days ago)
4713
Last active (days ago)
1 comments
2 participants
participants (2)
-
Amaury Forgeot d'Arc
-
Sturla Molden