Commit c308fb2e by Eric Coissac

Patch eco_malloc functions to allow more than 4Gb allocation on 64bits version

git-svn-id: https://www.grenoble.prabi.fr/svn/LECASofts/ecoPrimers/trunk@206 60f365c0-8329-0410-b2a4-ec073aeeaa1d
parent 796274d7
......@@ -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++;
......
......@@ -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);
......
......@@ -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;
......
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