backup to exit() function
This commit is contained in:
parent
c1e04b773a
commit
12ce6f7980
|
|
@ -23,8 +23,6 @@ extern HANDLE outheap;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../frontend/error.h" /* controlled_exit() */
|
|
||||||
|
|
||||||
/* Malloc num bytes and initialize to zero. Fatal error if the space can't
|
/* Malloc num bytes and initialize to zero. Fatal error if the space can't
|
||||||
* be tmalloc'd. Return NULL for a request for 0 bytes.
|
* be tmalloc'd. Return NULL for a request for 0 bytes.
|
||||||
*/
|
*/
|
||||||
|
|
@ -53,7 +51,7 @@ tmalloc(size_t num)
|
||||||
#endif
|
#endif
|
||||||
if (!s){
|
if (!s){
|
||||||
fprintf(stderr,"malloc: Internal Error: can't allocate %ld bytes. \n",(long)num);
|
fprintf(stderr,"malloc: Internal Error: can't allocate %ld bytes. \n",(long)num);
|
||||||
controlled_exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
return(s);
|
return(s);
|
||||||
}
|
}
|
||||||
|
|
@ -136,7 +134,7 @@ trealloc(void *ptr, size_t num)
|
||||||
}
|
}
|
||||||
if (!s) {
|
if (!s) {
|
||||||
fprintf(stderr,"realloc: Internal Error: can't allocate %ld bytes.\n", (long)num);
|
fprintf(stderr,"realloc: Internal Error: can't allocate %ld bytes.\n", (long)num);
|
||||||
controlled_exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
return(s);
|
return(s);
|
||||||
}
|
}
|
||||||
|
|
@ -177,7 +175,7 @@ hrealloc(void *ptr, size_t num)
|
||||||
}
|
}
|
||||||
if (!s) {
|
if (!s) {
|
||||||
fprintf(stderr,"HeapReAlloc: Internal Error: can't allocate %ld bytes.\n", (long)num);
|
fprintf(stderr,"HeapReAlloc: Internal Error: can't allocate %ld bytes.\n", (long)num);
|
||||||
controlled_exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
return(s);
|
return(s);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue