读书人

出现bug但是这段解决bug的代码又应该

发布时间: 2012-03-24 14:00:46 作者: rapoo

出现bug,但是这段解决bug的代码又应该添在哪里呢?
decisioncube出现bug,显示“the desicioncube capacity is low. please deactivate dimensions or change the data set.”在网上找到一下这段解决本bug的代码,但是不知道该添加在哪里。。。。。
哪位大侠知道该怎么办呢??


unit DecisionCubeBugWorkaround;


interface


uses Windows, Mxarrays;


implementation


function GetAvailableMem: Integer;

const

MaxInt: Int64 = High(Integer);

var

MemStats: TMemoryStatus;

Available: Int64;

begin

GlobalMemoryStatus(MemStats);

if (MemStats.dwAvailPhys > MaxInt) or (Longint(MemStats.dwAvailPhys) = -1) then

Available := MaxInt

else

Available := MemStats.dwAvailPhys;

if (MemStats.dwAvailPageFile > MaxInt) or (Longint(MemStats.dwAvailPageFile) = -1) then

Inc(Available, MaxInt div 2)

else

Inc(Available, MemStats.dwAvailPageFile div 2);

if Available > MaxInt then

Result := MaxInt

else

Result := Available;

end;


initialization

Mxarrays.SetMemoryCapacity(GetAvailableMem);

end.



[解决办法]
晕。。。。。。

菜单 File|New|Unit

读书人网 >.NET

热点推荐