[issue9942] Allow memory sections to be OS MERGEABLE

Kevin Hunter report at bugs.python.org
Sat Sep 25 07:41:31 CEST 2010


Kevin Hunter <hunteke at earlham.edu> added the comment:

My first thought is "Why is the reference counter stored with the object itself?"  I imagine there are very good reasons, however, and this is not an area in which I have much mastery.

Answering the question as best I can: I don't know how the reference counter is implemented in CPython, but if it's just a field in a struct, then madvise could be sent the memory location starting with the byte immediately following the reference counter.

If there's more to it than that, I'll have to back off with "I don't know."  I'm perhaps embarrassed that I'm not at all a Python developer, merely a Python application developer.  I have a few Python projects that are memory hungry, that at first glance I believe to be creating MERGEABLE objects.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9942>
_______________________________________


More information about the Python-bugs-list mailing list