[pypy-svn] r58589 - pypy/build/doc
xoraxax at codespeak.net
xoraxax at codespeak.net
Sat Oct 4 12:40:26 CEST 2008
Author: xoraxax
Date: Sat Oct 4 12:40:25 2008
New Revision: 58589
Modified:
pypy/build/doc/benchmark_memory.txt
Log:
Some ideas about static memory usage.
Modified: pypy/build/doc/benchmark_memory.txt
==============================================================================
--- pypy/build/doc/benchmark_memory.txt (original)
+++ pypy/build/doc/benchmark_memory.txt Sat Oct 4 12:40:25 2008
@@ -306,3 +306,28 @@
http://lwn.net/Articles/230975/ presents some ideas and a set
of patches for more precise page mapping information by
matt mackall
+
+
+Considerations about static memory usage
+----------------------------------------
+
+While languages like C guarantee locality of static global
+data and code by their module systems, PyPy generates a lot
+of functions and global data into various modules. One
+question is whether the resulting binary of the CC still
+provides locality of these structures. Imagine every
+vtable of the compiler's ast nodes spread in the resulting
+data segment -- a single bytecode compilation would load
+the whole data segment into RAM. Similar problems might
+be found with functions.
+
+One consequence is that reducing the static memory usage
+of the executable might not lead to reduced memory usage
+at runtime if the locality is good. Also increasing the locality
+would help to reduce the runtime memory usage.
+
+In order to find out what kind of global data is created by
+a translation of an RPython program, one could write a reftracker
+like graph viewer page that recursively sums up the value sizes
+and provides navigation to referenced container values.
+
More information about the Pypy-commit
mailing list