Jim Jewett <jimjjewett <at> gmail.com> writes: > > > The accessor macros to these fields (Py_REFCNT, Py_TYPE, Py_SIZE) > > are also available to applications. > > There have been several experiments in memory management, ranging from > not bothering to change the refcount on permanent objects like None, > to proxying objects across multiple threads or processes. These experiments don't seem to have been very successful, have they? Besides, Py_TYPE is a fundamental property of every PyObject. On the other hand, I think Py_SIZE should be discouraged in favour of the type-specific variants (PyString_GET_SIZE, etc.), since some types have their own way of (ab)using the size field. > I also > believe (but don't remember for sure) that some of the proposed > Unicode (or String?) optimizations changed the memory layout a bit. The one Unicode optimization I know of, in http://bugs.python.org/issue1943, is suspended because of Marc-Andre's opposition. In any case, it doesn't touch the fundamental PyObject layout. Regards Antoine.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4