Quantcast
Channel: Memory allocation fails. But why does it crash? Or does it? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Sergey Kalinichenko for Memory allocation fails. But why does it...

As the comments have stated, there is no crash on allocation failure, only an error message.If the message annoys you, you can turn it off by re-directing malloc's log to /dev/null, like this:export...

View Article



Answer by chux - Reinstate Monica for Memory allocation fails. But why does...

Code did not crash as "could not alloc newsize=153288611651277. Sorry" output occurred - just an additional message was printed. @Blagovest BuyuklievThe additional message is likely sent out on stderr...

View Article

Memory allocation fails. But why does it crash? Or does it?

I was experimenting with realloc, giving it larger and larger sizes and checking whether the same block was reused or not: int main ( void ){ char * newstr, * prevstr = NULL; size_t newsize, prevsize =...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images