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 tim.peters
Recipients amaury.forgeotdarc, mmokrejs, neologix, sjt, skrah, tim.peters, vstinner
Date 2013-08-30.21:22:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
OK, it sounds to me like you do not have a reproducible test case, of any kind.  It that's true, this bug report isn't going anywhere :-(

Python isn't a memory-testing program, so it would be insanely inefficient for it to (for example) read up every byte it writes, just to make sure the memory isn't bad.  If you want to alter the source of _your_ Python to do that, fine!  It won't go into the official distribution, but it might help you.

For the same reason, core Python won't go into the business of sorting out various kinds of memory addresses.  User-level code (including Python) works with the virtual (logical) addresses the operating system gives it.  For a hint of some of the difficulties in going deeper than that, here's a note from Linus Torvalds:

About "If you would have the time to stitch down some test for me to execute with the garbage collector calls, it would be probably the best."  I'm not sure what you're suggesting there.  That we write a Python program that tries to trigger errors in your BIOS?  LOL - not likely ;-)

If you want to force a lot of allocations, deallocations, and gc runs, something like this will do it:

def stress():
    import gc

    class C(object):
        def __init__(self):
            self.loop = self

    N = 500000
    d = dict((C(), C()) for i in xrange(N))
    j = 0
    while 1:
        for i in xrange(N // 2):
        for i in xrange(N // 2):
            d[C()] = C()
        j += 1
        if j % 10 == 0:
            print j


Setting N larger will make it consume more RAM.  The output is essentially meaningless, produced just so you know it's still running.
Date User Action Args
2013-08-30 21:22:08tim.peterssetrecipients: + tim.peters, amaury.forgeotdarc, mmokrejs, vstinner, sjt, skrah, neologix
2013-08-30 21:22:08tim.peterssetmessageid: <>
2013-08-30 21:22:08tim.peterslinkissue18843 messages
2013-08-30 21:22:07tim.peterscreate