首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

出现bug,但是这段解决bug的代码又应该添在哪里呢?该如何处理

2012-03-24 
出现bug,但是这段解决bug的代码又应该添在哪里呢?decisioncube出现bug,显示“thedesicioncubecapacityislow

出现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

热点排行