From 3cced153f4df35ee6393823642605e6f8d0666d3 Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 23 Sep 2010 10:10:56 +0000 Subject: [PATCH] Fix for the IPAL21919: WinTC5.1.4: message about lack of memory, creating series of scalar maps etc. --- src/VISUGUI/VisuGUI_Prs3dTools.h | 2 +- src/VISU_I/VISU_ColoredPrs3dCache_i.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 ) -- 2.39.2