diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2013-03-31 00:50:28 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2013-03-31 00:50:28 +0400 |
commit | 68ac08681a084ae719fdfb3c3063593970d2d7b3 (patch) | |
tree | 69994eb96e907131595d81d98f98c1233049bcd3 | |
parent | ae1028df73dc4280b033a6c3230dbb9402b15a2f (diff) |
Elbeem fluid: Remove hardcoded 16GB RAM limit on 64bit systems
-rw-r--r-- | intern/elbeem/intern/solver_init.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/intern/elbeem/intern/solver_init.cpp b/intern/elbeem/intern/solver_init.cpp index 63ce1570eea..4c398ab9cb4 100644 --- a/intern/elbeem/intern/solver_init.cpp +++ b/intern/elbeem/intern/solver_init.cpp @@ -691,7 +691,8 @@ bool LbmFsgrSolver::initializeSolverMemory() calculateMemreqEstimate( mSizex, mSizey, mSizez, mMaxRefine, mFarFieldSize, &memEstFromFunc, &memEstFine, &memreqStr ); - double memLimit; + bool noLimit = false; + double memLimit = 0.; string memLimStr("-"); if(sizeof(void*)==4) { // 32bit system, limit to 2GB @@ -699,8 +700,9 @@ bool LbmFsgrSolver::initializeSolverMemory() memLimStr = string("2GB"); } else { // 64bit, just take 16GB as limit for now... - memLimit = 16.0* 1024.0*1024.0*1024.0; - memLimStr = string("16GB"); + // memLimit = 16.0* 1024.0*1024.0*1024.0; + // memLimStr = string("16GB"); + noLimit = true; } // restrict max. chunk of 1 mem block to 1GB for windos @@ -724,7 +726,7 @@ bool LbmFsgrSolver::initializeSolverMemory() memBlockAllocProblem = true; } - if(memEstFromFunc>memLimit || memBlockAllocProblem) { + if(!noLimit && (memEstFromFunc>memLimit || memBlockAllocProblem)) { sizeReduction *= 0.9; mSizex = (int)(orgSx * sizeReduction); mSizey = (int)(orgSy * sizeReduction); |