[pypy-svn] r76278 - pypy/extradoc/talk/ep2010/talk
afa at codespeak.net
afa at codespeak.net
Mon Jul 19 01:20:13 CEST 2010
Author: afa
Date: Mon Jul 19 01:20:12 2010
New Revision: 76278
Modified:
pypy/extradoc/talk/ep2010/talk/talk.rst
Log:
Describe more cpyext details
Modified: pypy/extradoc/talk/ep2010/talk/talk.rst
==============================================================================
--- pypy/extradoc/talk/ep2010/talk/talk.rst (original)
+++ pypy/extradoc/talk/ep2010/talk/talk.rst Mon Jul 19 01:20:12 2010
@@ -508,13 +508,36 @@
- *not* faster than python code!
+- PyObject contains ob_type and ob_refcnt
+
+ * The "abstract object interface" is used.
+
+- Some objects contain more:
+
+ * PyString_AsString() must keep the buffer alive at a fixed location
+
+ * PyTypeObject exposes all its fields
+
+
The Reference Counting Issue
----------------------------
-- pypy uses a moving garbage collector
+- pypy uses a moving garbage collector, starts with static roots to
+ find objects.
+
+- CPython objects don't move, and PyObject* can point to deallocated
+ memory.
+
+- cpyext builds PyObject as proxies to the "real" interpreter objects
+
+- one dictionary lookup each time the boundary is crossed
+
+- More tricks needed for borrowing references
--
+ * The object lifetime is tied to its container.
+ * "out of nothing" borrowed references are kept until the end of the
+ current pypy->C call.
suppported modules
------------------
More information about the Pypy-commit
mailing list