Dave Malcolm <dmalc...@redhat.com> added the comment:

One possible use for this: mark the "str" buffers of PyUnicodeObject instances 
when demarshalling docstrings from disk; in theory these ought not to change, 
and can be quite large: the bulk of the memory overhead is stored in a separate 
allocation from the object, and thus isn't subjected to the ob_refcnt twiddling.

No idea if it's worth it though; the syscall overhead might slow down module 
import; also, KSM works at the level of 4K pages, and it's not clear that the 
allocations would line up nicely with pages.

FWIW, various related ideas here:
  http://dmalcolm.livejournal.com/4183.html
Again, no idea if these are worthwhile, this was a brainstorm on my blog, and 
some of the ideas would involve major surgery to CPython to implement.

----------
nosy: +dmalcolm

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9942>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to