From: rnv Date: Thu, 23 Sep 2010 10:10:56 +0000 (+0000) Subject: Fix for the IPAL21919: WinTC5.1.4: message about lack of memory, creating series... X-Git-Tag: mergeto_V5_1_main_04Oct10~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3cced153f4df35ee6393823642605e6f8d0666d3;p=modules%2Fvisu.git Fix for the IPAL21919: WinTC5.1.4: message about lack of memory, creating series of scalar maps etc. --- diff --git a/src/VISUGUI/VisuGUI_Prs3dTools.h b/src/VISUGUI/VisuGUI_Prs3dTools.h index e1028449..bd7f27e2 100644 --- a/src/VISUGUI/VisuGUI_Prs3dTools.h +++ b/src/VISUGUI/VisuGUI_Prs3dTools.h @@ -147,7 +147,7 @@ namespace VISU if( anEnlargeType == VISU::ColoredPrs3dCache::IMPOSSIBLE ) { size_t aMb = 1024 * 1024; - double aFreeMemory = double(VISU_PipeLine::GetAvailableMemory(8192*aMb)) / double(aMb); + double aFreeMemory = double(VISU_PipeLine::GetAvailableMemory(8192*(double)aMb)) / double(aMb); CORBA::Float aNecessaryMemory = aRequiredMemory - aFreeMemory - anUsedMemory; SUIT_MessageBox::warning(GetDesktop(theModule), diff --git a/src/VISU_I/VISU_ColoredPrs3dCache_i.cc b/src/VISU_I/VISU_ColoredPrs3dCache_i.cc index 0dcddc75..82ae9dfd 100644 --- a/src/VISU_I/VISU_ColoredPrs3dCache_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3dCache_i.cc @@ -356,7 +356,7 @@ VISU::ColoredPrs3dCache_i theRequiredMemory = int( aMemoryUsed + aMemoryNeeded ) + 1; size_t aMb = 1024 * 1024; - double aFreeMemory = double(VISU_PipeLine::GetAvailableMemory(8192*aMb)) / double(aMb); + double aFreeMemory = double(VISU_PipeLine::GetAvailableMemory(8192*(double)aMb)) / double(aMb); anEnlargeType = aMemoryNeeded < aFreeMemory ? VISU::ColoredPrs3dCache::ENLARGE : VISU::ColoredPrs3dCache::IMPOSSIBLE; } @@ -460,7 +460,7 @@ VISU::ColoredPrs3dCache_i return; size_t aMb = 1024 * 1024; - double aFreeMemory = double(VISU_PipeLine::GetAvailableMemory(8192*aMb)) / double(aMb); + double aFreeMemory = double(VISU_PipeLine::GetAvailableMemory(8192*(double)aMb)) / double(aMb); CORBA::Float aMemoryUsed = GetDeviceMemorySize(); CORBA::Float aMemoryNeeded = theMemorySize - aMemoryUsed; if( aMemoryNeeded > aFreeMemory )