您的位置:首页 > 编程语言 > Delphi

delphi 中关于 The DecisionCube capacity is low. Please deactivate dimensions or change the data set 错误的处理

2008-10-05 23:09 831 查看
描述
when the sum of the physical memory and the available page file memory exceeds 2 GBytes, then the DecisionCube raises the following exception: 当总和的物理内存和页面文件可存储超过2 GBytes ,然后DecisionCube提出了以下异常:
The DecisionCube capacity is low. 该DecisionCube能力低。 Please deactivate dimensions or change the data set. 请停用层面或更改数据集。

这个问题是在使用整数的函数GetAvailableMem ,我解决这个,这个单位加入到该项目中。

*********************************************************************************************************************************
unit DecisionCubeBugWorkaround;

interface

uses Windows, Mxarrays;

implementation

function GetAvailableMem: Integer;
const
//MaxInt: Int64 = High(Integer); if Upper than 3 Delphi Version
MaxInt = High(Integer);
var
MemoryStatus: TMemoryStatus;
//AvailableMem: Int64; if Upper than 3 Delphi Version
AvailableMem: LongInt;
begin
MemoryStatus.dwLength :=SizeOf(MemoryStatus);
GlobalMemoryStatus(MemoryStatus);
AvailableMem:= MemoryStatus.dwAvailPhys;
if AvailableMem >= 0 then
AvailableMem:= AvailableMem + MemoryStatus.dwAvailPageFile;

if AvailableMem < 0 then
Result := MaxInt
else
Result := AvailableMem;
end;

initialization
Mxarrays.SetMemoryCapacity(GetAvailableMem);
end.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐