admin管理员组

文章数量:1612063

描述 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.

本文标签: 错误CapacitydeactivatedelphiDecisionCube