diff options
author | Lassi Marttala <lassi.lm.marttala@partner.bmw.de> | 2012-05-30 11:56:22 +0200 |
---|---|---|
committer | Christian Muck <christian.muck@bmw.de> | 2012-06-13 23:52:40 +0200 |
commit | bea4e475456745f444e2451415366d0e283f835c (patch) | |
tree | b9a84d2fbf19784f1b33f5c59f5d664b3d8b8dc4 /src/system/dlt-system.h | |
parent | f8f80a07afd45d60c2975bfd7e4b859fb8c10a96 (diff) | |
download | DLT-daemon-bea4e475456745f444e2451415366d0e283f835c.tar.gz |
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 <christian.muck@bmw.de>
Diffstat (limited to 'src/system/dlt-system.h')
-rw-r--r-- | src/system/dlt-system.h | 5 |
1 files changed, 5 insertions, 0 deletions
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. |