From bea4e475456745f444e2451415366d0e283f835c Mon Sep 17 00:00:00 2001 From: Lassi Marttala Date: Wed, 30 May 2012 11:56:22 +0200 Subject: dlt-system: Logging of error conditions. Assert memory allocations. dlt-system: logfile module would sometimes deadlock in the end of a file because of feof() reset in the end of the file. Signed-off-by: Christian Muck --- src/system/dlt-system.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/system/dlt-system.h') diff --git a/src/system/dlt-system.h b/src/system/dlt-system.h index d603dcf..fd741dc 100644 --- a/src/system/dlt-system.h +++ b/src/system/dlt-system.h @@ -70,6 +70,11 @@ #define MAX_THREADS 8 +// Macros +#define MALLOC_ASSERT(x) if(x == NULL) {\ + fprintf(stderr, "Out of memory\n");\ + abort();} + /** * Configuration structures. * Please see dlt-system.conf for explanation of all the options. -- cgit v1.2.1