diff --git a/src/libecoPCR/ecoMalloc.c b/src/libecoPCR/ecoMalloc.c index f1a0d0f..0719a8d 100644 --- a/src/libecoPCR/ecoMalloc.c +++ b/src/libecoPCR/ecoMalloc.c @@ -20,7 +20,7 @@ void ecoMallocedMemory() return eco_amount_malloc; } -void *eco_malloc(int32_t chunksize, +void *eco_malloc(int64_t chunksize, const char *error_message, const char *filename, int32_t line) @@ -47,7 +47,7 @@ void *eco_malloc(int32_t chunksize, } void *eco_realloc(void *chunk, - int32_t newsize, + int64_t newsize, const char *error_message, const char *filename, int32_t line) @@ -58,8 +58,10 @@ void *eco_realloc(void *chunk, if (!newchunk) + { ecoError(ECO_MEM_ERROR,error_message,filename,line); - + fprintf('Requested memory : %d\n',newsize); + } if (!chunk) eco_chunk_malloc++; diff --git a/src/libecoPCR/ecoPCR.h b/src/libecoPCR/ecoPCR.h index bd13942..237ec32 100644 --- a/src/libecoPCR/ecoPCR.h +++ b/src/libecoPCR/ecoPCR.h @@ -130,14 +130,14 @@ typedef struct { int32_t is_big_endian(); int32_t swap_int32_t(int32_t); -void *eco_malloc(int32_t chunksize, +void *eco_malloc(int64_t chunksize, const char *error_message, const char *filename, int32_t line); void *eco_realloc(void *chunk, - int32_t chunksize, + int64_t chunksize, const char *error_message, const char *filename, int32_t line); diff --git a/src/libecoprimer/strictprimers.c b/src/libecoprimer/strictprimers.c index 175379a..868933c 100644 --- a/src/libecoprimer/strictprimers.c +++ b/src/libecoprimer/strictprimers.c @@ -50,7 +50,7 @@ void addSeqToWordCountTable(pwordcount_t table, uint32_t wordsize, uint32_t circ buffersize = table->size + ecoWordCount(wordsize,circular,seq); table->words = ECOREALLOC(table->words,buffersize*sizeof(word_t), - "Cannot allocate memory to extend word table"); + "\n\nCannot allocate memory to extend word table" ); newtable = table->words + table->size;