Author: Remi Meier <[email protected]>
Branch: c8-private-pages
Changeset: r1515:be35498ceb30
Date: 2015-01-12 13:35 +0100
http://bitbucket.org/pypy/stmgc/changeset/be35498ceb30/

Log:    add short description about how to save memory in the future

diff --git a/c8/stm/pages.h b/c8/stm/pages.h
--- a/c8/stm/pages.h
+++ b/c8/stm/pages.h
@@ -6,6 +6,14 @@
 
   Each virtual page is either accessible, or PAGE_NO_ACCESS (and then
   has no underlying memory).
+
+  TODO: one way to save memory is to re-share pages during major GC.
+  The pages are mapped MAP_PRIVATE in all segments. We could use an
+  extra segment that is mapped SHARED to underlying file pages so
+  we can map PRIVATE pages from segments to it. The idea is that
+  a major GC first validates all segments (incl. the extra seg.),
+  then re-maps all PRIVATE, unmodified pages to the SHARED (unmodified)
+  page. Thus, we get "free" copy-on-write supported by the kernel.
 */
 
 #define PAGE_FLAG_START   END_NURSERY_PAGE
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to