more typecasts to double to avoid 32-bit int overflows when computing memory usage
This commit is contained in:
@ -247,7 +247,7 @@ void ComputeDisplaceAtom::refresh()
|
||||
|
||||
double ComputeDisplaceAtom::memory_usage()
|
||||
{
|
||||
double bytes = nmax*4 * sizeof(double);
|
||||
double bytes = (double)nmax*4 * sizeof(double);
|
||||
bytes += (double)nvmax * sizeof(double);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user