This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients amaury.forgeotdarc, georg.brandl, hunteke, pitrou
Date 2010-09-25.10:34:43
SpamBayes Score 3.4669913e-05
Marked as misclassified No
Message-id <1285410885.61.0.662159471861.issue9942@psf.upfronthosting.co.za>
In-reply-to
Content
> 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

Well, first, this would only work for large objects. Must objects in Python are quite small individually, unless you have very large (unicode or binary) strings, or very big integers.

Second, madvise() works at the page granularity (4096 bytes on most system), and it will be very likely this will include the reference count for the current object.

Third, MADV_MERGEABLE will only be efficient if you have actual duplications of whole memory pages (and, practically, if you have enough of them to make a real difference). Why do you think you might have such duplication in your workload?
History
Date User Action Args
2010-09-25 10:34:45pitrousetrecipients: + pitrou, georg.brandl, amaury.forgeotdarc, hunteke
2010-09-25 10:34:45pitrousetmessageid: <1285410885.61.0.662159471861.issue9942@psf.upfronthosting.co.za>
2010-09-25 10:34:44pitroulinkissue9942 messages
2010-09-25 10:34:43pitroucreate