Delphi 64 bit compiler still limited to 2 GB static data structures.

Skybuck Flying <[email protected]> Sat, 27 Aug 2022 16:32:31 -0700 (PDT)
Newsgroups alt.comp.lang.borland-delphi
Message-ID <[email protected]>
Yesterday/Today 27/28 august 2022 I discover Delphi 10.3 is still limited to 2 gigabyte static data structures.

TstaticArray = array[0..?] of byte;

Where ? is limited to 2 giga.

This could become a problem when wanting to debug a big array, where only a pointer to the array is available.

For now I worked around the problem by converting the static array to a dynamic array as follows:

TdynamicArray= array of byte;

And then passing these arrays to a DLL library as a pointer.

vArray : TdynamicArray;

SetLength(vArray, 100000);
Pass( @vArray[0] );

The debugger is then capable of inspecting all array elements of vArray as long as it does not get to big.

On this 6 GB RAM system it was not possible to debug a 3 GB array, even with dynamic arrays.

Delphi would not visualize the content of the 3 GB array, or it simply took too long.

I hope this will be improved somehow in the future.

Bye for now,
  Skybuck.