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 vstinner
Recipients josh.r, pitrou, vstinner
Date 2014-05-02.21:02:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1399064573.68.0.14015774699.issue21419@psf.upfronthosting.co.za>
In-reply-to
Content
Without the patch, 1 << (2**29) allocates 69.9 MB. With the patch, 1 << (2**29) allocates 0.1 MB (104 KB).

Without the patch, 

$ ./python
Python 3.5.0a0 (default:5b0fda8f5718, May  2 2014, 22:47:06) 
[GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux
>>> import os
>>> os.system("grep RSS /proc/%s/status" % os.getpid())
VmRSS:	    6164 kB
>>> x=1 << (2**29)
>>> os.system("grep RSS /proc/%s/status" % os.getpid())
VmRSS:	   76064 kB

With the patch:

haypo@selma$ ./python
Python 3.5.0a0 (default:5b0fda8f5718+, May  2 2014, 22:55:47) 
[GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.system("grep RSS /proc/%s/status" % os.getpid())
VmRSS:	    5864 kB
>>> x=1 << (2**29)
>>> os.system("grep RSS /proc/%s/status" % os.getpid())
VmRSS:	    5968 kB
History
Date User Action Args
2014-05-02 21:02:53vstinnersetrecipients: + vstinner, pitrou, josh.r
2014-05-02 21:02:53vstinnersetmessageid: <1399064573.68.0.14015774699.issue21419@psf.upfronthosting.co.za>
2014-05-02 21:02:53vstinnerlinkissue21419 messages
2014-05-02 21:02:53vstinnercreate