Hi Folks,
according the documentation "Arrays are limited to 2 GBytes in size in the default processor mode." Is there another mode allowing bigger arrays?
Cheers,
miklos

Mailing lists / fpc-devel / 2008-05
10 messages · 7 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hi Folks,
according the documentation "Arrays are limited to 2 GBytes in size in the default processor mode." Is there another mode allowing bigger arrays?
Cheers,
miklos
What about iterators, linked lists ? You can use them some of them. You can also create a temporary file that built in a way that you understand it as an "array". there are many ways to do work around over this issues.
I yet found a good reason to have such a big data for array. It's bed practice. you should use either iterators or linked list (while many times iterators are better).
Ido
according the documentation "Arrays are limited to 2 GBytes in size in the default…
64 Bit mode/compiler.
Except for darwin.
Except it doesn't work:
http://www.freepascal.org/testsuite/cgi-bin/testsuite.cgi?action=3&run1id=21737&testfileid=2417
Vincent
Maybe Win64 doesn't support it either.
And note that this test (and the darwin remark) about statically allocated arrays. Dynamically allocated arrays don't have such limitations.
Jonas
Except for darwin. Except it doesn't work: http://www.freepascal.org/testsuite/cgi-bin/tes…
This is operation system dependent also if you can declare static data structures of this size. Things like
type
ta = array[0..$fffffffff] of byte;
var
p : ^ta;
begin
new(p);
end.should work e.g. on linux.
Maybe Win64 doesn't support it either. And note that this test (and the darwin remark)…
Linux either:
http://www.freepascal.org/testsuite/cgi-bin/testsuite.cgi?action=3&run1id=21719&testfileid=2417
And note that this test (and the darwin remark) about statically allocated arrays. Dynamically allocated arrays don't have such limitations.
Good point.
Vincent
This is operation system dependent also if you can declare static data structures of this…
Has sb meanwhile crafted an executable on win64 that actually uses >2GB ?
This is operation system dependent also if you can declare static data structures of this…
Op Fri, 9 May 2008, schreef Florian Klaempfl:
Yes, this would work, but wrapping it in a record and adding a field to it might not work. The reason is that the x86_64 still uses singed 32-bit displacements in its operands. To support this, a different code generation is needed, which we don't have.
Many compilers have an mcmodel switch. FPC's x86_64 code generation compares to mcmodel=small.
Daniël
This is only important for static data which requires relocation. For heap/stack the compiler simply generates the constants.