Sunday, January 13, 2013

Financial crisis in C programming language

for(;;) // main execution loop
{
    mem = malloc(needed_memory);
    if (NULL == mem)
    {
         // this should never happen!

         // but guess what? It does... from time to time.
         exit(EXIT_FAILURE);
    }
    .......
}

And the solution is to restart the program over and over again.


Sounds familiar?

No comments: