Commit dd40e9b3 authored by antma's avatar antma

don't output backtrace in out of memory case

parent 5de0d759
......@@ -30,6 +30,8 @@
#include "tools.h"
#ifdef DEBUG
#define RES_PRE 8
#define RES_AFTER 8
#define MAX_BLOCKS 1000000
void *blocks[MAX_BLOCKS];
void *free_blocks[MAX_BLOCKS];
......@@ -37,18 +39,13 @@ int used_blocks;
int free_blocks_cnt;
#endif
#ifdef DEBUG
#define RES_PRE 8
#define RES_AFTER 8
#endif
extern int verbosity;
long long total_allocated_bytes;
static void out_of_memory (void) {
logprintf ("Out of memory\n");
assert (0 && "Out of memory");
fprintf (stderr, "Out of memory\n");
exit (1);
}
int tsnprintf (char *buf, int len, const char *format, ...) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment