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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user