abort() on memory error
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1544 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -256,8 +256,10 @@ MallocWithRetry(int bytes, char *diagStr)
|
||||
fprintf (stderr, "Malloc failed for %s. #Bytes %d.\n", diagStr, bytes);
|
||||
// fflush (stderr);
|
||||
#endif
|
||||
/* The user gets a chance to close other applications and try again. */
|
||||
|
||||
abort();
|
||||
#if 0
|
||||
/* The user gets a chance to close other applications and try again. */
|
||||
if (!MessageWithRetry ("I'm out of memory! "
|
||||
"Please close other applications and click OK to try again"))
|
||||
{
|
||||
@@ -268,6 +270,7 @@ MallocWithRetry(int bytes, char *diagStr)
|
||||
exit (0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user