Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[12212] Re:Tsmallintarray의 괴현상,,
이상해씨 [] 1776 읽음    2008-09-30 14:41
결론은 델파이 버그네요ㅜ

델마당의 빠야님의 도움으로 알게 됐습니다;;

알고 보니 제 데스크탑 메모리가 2기가 인데 그게 문제 였던거 같네요.

해결법은 아래와같이 Unit를 만들어서 Project에 포함시켜서 컴파일하니 해결됩니다.

저의 무지함이 본의 아니게 간만에 데스크탑 포맷도 하고 각종 하드웨어 펌웨어 업글까지 하게됐네요;;

{-------------------------------------------------------------------------------

        Bug workaround for 'The DecisionCube capacity is low' bug

________________________________________________________________________________

BUG DESCRIPTION
  If you have a lot of physical memory or a large page file, you may find that a
  DecisionCube raises the following exception whenever the DecisionCube's data
  set is opened:
    Exception class: ELowCapacityError
    Message: "The DecisionCube capacity is low. Please deactivate dimensions or
             change the data set."
  The exception will occur whenever the sum of the available physical memory and
  the available page file memory exceeds 2 GBytes. This is caused by a bug in
  Delphi - more specifically: an integer being out of range in the procedure
  GetAvailableMem (unit Mxarrays).

AFFECTED DELPHI VERSIONS
  Delphi 3-7 (with the DecisionCube package installed)

WORKAROUND
  Add this unit to your project.
-------------------------------------------------------------------------------}

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.

+ -

관련 글 리스트
12211 Tsmallintarray의 괴현상,, 이상해씨 1543 2008/09/30
12212     Re:Tsmallintarray의 괴현상,, 이상해씨 1776 2008/09/30
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.