Problem 2GB Ram

Discussion forum for PivotCube VCL users. Common questions. Bug and problem reports

Moderator: Alex Zencovich

Problem 2GB Ram

Postby bobibp » Tue Dec 22, 2009 10:35 am

Hi as we all know x86 application ca allocate max of 2GB RAM. Wa are using several CUBES operating on large amount of data.
The result is "Catastrophic failure" during EXPANDALL procedure in PIVOTGRID here:



in BinaryCube;

procedure CreatePage;
begin
if FPageCount = High(FPages) - 1 then
SetLength(FPages,FPageCount + MANAGER_PAGE_COUNT);
FPages[FPageCount] := new (PBinaryNodePage);
Inc(FPageCount);
end;
begin
if FRecordCount div MANAGER_PAGE_SIZE > FPageCount - 1 then
CreatePage; ---------------- HERE ----------------------------
Page := FPages[FRecordCount div MANAGER_PAGE_SIZE];
Result := @Page.VData[FRecordCount mod MANAGER_PAGE_SIZE];
Inc(FRecordCount);
end;

function TBinaryCube.CreatePage : BinaryCell;
begin
Result := BinaryCell.Create(FDimCount);
Inc(FPageCount);
end;

Is it possible to check this Pagecount before Failure , so we calculete needed memory size. (Page size * Pagecount )

best regards
bobibp
User
 
Posts: 15
Joined: Sat Jan 10, 2009 7:43 am

Re: Problem 2GB Ram

Postby AlexZencovich » Thu Dec 24, 2009 5:44 am

It is impossible and anyway has no effect. That is no only one memory allocation so if you do not have enough RAM you will stick on error.

BTW, you may use 3GB RAM with Delphi 6+ and FastMM.

There are some conditional defines (inside FastMM4Options.inc) that may be used to tweak the memory manager. To enable support for a user mode address space greater than 2GB you will have to use the EditBin* tool to set the LARGE_ADDRESS_AWARE flag in the EXE header. This informs Windows x64 or Windows 32-bit (with the /3GB option set) that the application supports an address space larger than 2GB (up to 4GB). In Delphi 6 and later you can also specify this flag through the compiler directive {$SetPEFlags $20}
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am


Return to PivotCube VCL

Who is online

Users browsing this forum: No registered users and 4 guests

cron