Unit Huge

From: psteinsund@AWI-Bremerhaven.DE (Per Ivar Steinsund) Could you please add this unit to the Delphi Super Page Freeware library? It seems to a lot of people who need huge arrays, judgeing from the amount of questions about this in the newsgroups. This unit can easily be change to support any array or more than 2-dimensional arrays. This method using the global memory for arrays is nearly as fast as normal arrays. Per Ivar Steinsund

Classes

THugeArray -
THugeMatrix -
THugeRealArray -
THugeSingleMatrix -
THugeWordMatrix -

Functions

Types

Adr
PReal
PSingle

Constants

SegSize

Variables


Functions


Types


Adr = record
Off : Word;
Seg : Word;
end;

PReal=^Real

PSingle=^Single

Constants

SegSize = $FFFF

**********************************************) (* Unit for making dynamic arrays and matrix. *) (* The elementsize has a limit of 64 kB, but *) (* the total size of each array/matrix is only *) (* limited by available memory. *) (* *) (* Per Ivar Steinsund (1995) *) (* *) (* Example and use: *) (* *) (* var J:longint; *) (* Arr:THugeRealArray; *) (* *) (* begin *) (* Arr:=THugeRealArray.Init(0,200000, *) (* SizeOf(Real),true)); *) (* if Arr.Data<>nil then *) (* for J:=0 to 200000 do Arr.I(J)^:=J/5; *) (* Arr.Destroy; *) (* end; *) (* *) (

Variables