diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2016-05-16 18:47:09 +0200 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2016-05-16 18:47:09 +0200 |
| commit | 044dc5a93c33d7aa4c9c98a626890c16446a56fc (patch) | |
| tree | 23cc17a595d36a35ad9cb50e3ab18c2956b5f65c /src/gensvm_memory.c | |
| parent | Move includes to header (diff) | |
| download | gensvm-044dc5a93c33d7aa4c9c98a626890c16446a56fc.tar.gz gensvm-044dc5a93c33d7aa4c9c98a626890c16446a56fc.zip | |
major refactor of the code
Diffstat (limited to 'src/gensvm_memory.c')
| -rw-r--r-- | src/gensvm_memory.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gensvm_memory.c b/src/gensvm_memory.c index 529ef79..63c8965 100644 --- a/src/gensvm_memory.c +++ b/src/gensvm_memory.c @@ -7,7 +7,6 @@ */ #include "globals.h" // imports gensvm_memory.h -#include "gensvm_util.h" /** * @brief Wrapper for calloc() which warns when allocation fails @@ -34,7 +33,7 @@ void *mycalloc(const char *file, int line, unsigned long size, void *ptr = calloc(size, typesize); if (!ptr) { - err("Could not allocate memory: %d bytes (%s:%d)\n", + fprintf(stderr, "Couldn't allocate memory: %lu bytes (%s:%d)\n", size, file, line); exit(EXIT_FAILURE); } @@ -63,7 +62,7 @@ void *mymalloc(const char *file, int line, unsigned long size) { void *ptr = malloc(size); if (!ptr) { - err("Could not allocate memory: %d bytes (%s:%d)\n", + fprintf(stderr, "Couldn't allocate memory: %lu bytes (%s:%d)\n", size, file, line); exit(EXIT_FAILURE); } @@ -93,7 +92,7 @@ void *myrealloc(const char *file, int line, unsigned long size, void *var) { void *ptr = realloc(var, size); if (!ptr) { - err("Could not reallocate memory: %d bytes (%s:%d)\n", + fprintf(stderr, "Couldn't reallocate memory: %lu bytes (%s:%d)\n", size, file, line); exit(EXIT_FAILURE); } |
