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 <>
"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.
Date User Action Args
2014-04-27 16:38:51vstinnersetrecipients: + vstinner, pitrou, njs, skrah, neologix, jtaylor, josh.r
2014-04-27 16:38:51vstinnersetmessageid: <>
2014-04-27 16:38:51vstinnerlinkissue21233 messages
2014-04-27 16:38:51vstinnercreate