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, jtaylor, neologix, njs, pitrou, skrah, vstinner
Date 2014-04-27.16:38:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1398616731.4.0.50026045517.issue21233@psf.upfronthosting.co.za>
In-reply-to
Content
"Because if a code creates many such objects which basically just do
calloc(), on operating systems with memory overommitting (such as
Linux), the calloc() allocations will pretty much always succeed, but
will segfault when the page is first written to in case of low memory."

Overcommit leads to segmentation fault when there is no more memory, but I don't see how calloc() is worse then malloc()+memset(0). It will crash in both cases, no?

In my experience (embedded device with low memory), programs crash because they don't check the result of malloc() (return NULL on allocation failure), not because of overcommit.
History
Date User Action Args
2014-04-27 16:38:51vstinnersetrecipients: + vstinner, pitrou, njs, skrah, neologix, jtaylor, josh.r
2014-04-27 16:38:51vstinnersetmessageid: <1398616731.4.0.50026045517.issue21233@psf.upfronthosting.co.za>
2014-04-27 16:38:51vstinnerlinkissue21233 messages
2014-04-27 16:38:51vstinnercreate