[Gmsh] Out of memory
Mark van Doesburg
mark.van.doesburg at technolution.nl
Mon Jun 22 10:21:58 CEST 2009
Ah, indeed: getdp still uses the old format... :-(
Do you have an alternative solver which generates the new format? ;-)
I'm not sure if we should merge your patch for ListUtils.h as is:
I don't understand why the access functions would work (since
the index should definitely also be a long int), the I/O will
be inconsistent, etc.
The patch works as long as there are no more than 2^31 elements in the
list. The original code failed as soon as the list required more than
2^31 bytes. I agree it's probably not the best way to solve the problem,
but it is the least amount of work.
Would you be willing to go over the full code in ListUtils.cpp
and make it 64 bit aware?
Sure, but there are two ways to do this. One is to modify the code
in ListUtils.cpp, but not the data types used in ListUtils.h, it would
result in a cast for every malloc/memcmp etc. The other solution would be
to change the data type for List_T and make every size related integer
of type size_t, this may also impact other code. Which solution would
you prefer?
Mark.