Kevin Hunter <hunt...@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 <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