From 440fec6289cecb55bcab50a480cb515f91e0ca7f Mon Sep 17 00:00:00 2001 From: meep-eep Date: Fri, 18 Feb 2005 22:56:01 +0000 Subject: [PATCH] abort() on memory error git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1544 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/libs/memory/w_memlib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sc2/src/sc2code/libs/memory/w_memlib.c b/sc2/src/sc2code/libs/memory/w_memlib.c index f2cdbf09d..7cd1de95e 100644 --- a/sc2/src/sc2code/libs/memory/w_memlib.c +++ b/sc2/src/sc2code/libs/memory/w_memlib.c @@ -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 } }