Forum > Database

"Data element too large"

<< < (4/6) > >>

eli:

--- Quote from: PascalDragon on November 16, 2021, 09:22:24 pm ---Maybe you tell us what exactly you're trying to achieve? Maybe we can point you to a better way then...

--- End quote ---

What I need is my structure, as defined in the beginning of this thread. The structure contains arrays of records with a "huge" size, as defined in the beginning of this thread.

I'm fine with replacing the arrays of records by arrays of pointers (to records), but I need the arrays themselves, because of some arithmetical computation that has to be made with the indices of those arrays.

The probelm is, that FPC doesn't accept my structure: Actually, if I use arrays of records (rather than arrays of pointers to records), the compiler presents the message "data element too large". Indeed, the program is compiled well if I use arrays of pointers (to records), but it exits before the task is completed, with the exitcode 5 (sometimes 255), and I wonder why. By "task" I mean, even the simple task of using the reserved word NEW for all of the pointers.

My OS is Windows Seven, 64 bit. My current RAM is 6 G, as for today (as opposed to yesterday). my FPC version is 3.2.2.win32.and.win 64.exe. Maybe I should download another version, e.g. 3.2.2.i386-win32.cross.x86_64-win64.exe ???

winni:
Hi!

I compiled your initiale structure with ppcross64.exe on win7/64.

Compiles and runs fine. Shows a sizeof( ArrayOfRecords) of 1,8... GigaByte.

Winni

eli:

--- Quote from: winni on November 17, 2021, 10:29:57 am ---Hi!

I compiled your initiale structure with ppcross64.exe on win7/64.

Compiles and runs fine. Shows a sizeof( ArrayOfRecords) of 1,8... GigaByte.

Winni

--- End quote ---

Do you have a link to the ppcross64.exe you have suggested?

However, when I click the "Help" button, and then the "About" button, I get the message "Free Pascal IDE for Win32 for i386. Target CPU: i386".

My problem is as follows: When I add the directive {$mode objfpc} in the beginning of my initial program, the compiler presents the mesgae "data element too large".

Additionally, even without adding the directive {$mode objfpc}, when I replace the arrays of records by arrays of pointers to records, and try using the reserved word NEW to allocate memory for all of the pointers, the program exits before it completes its task.

OS: Windows Seven, 64 bit.
RAM: 6 G.

marcov:
Let's start with the basics. Do you use 64-bit Windows FPC compiler or win32?

(if you go to project options, and then click the "show options" button, what do you get?)

eli:

--- Quote from: marcov on November 17, 2021, 12:07:23 pm ---Let's start with the basics. Do you use 64-bit Windows FPC compiler or win32?

(if you go to project options, and then click the "show options" button, what do you get?)

--- End quote ---

As for your question: my free Pascal IDE doesn't show the "show options" button. It does show the "options" button. What should I click after clicking the "options" button?

When I click the "Help" button, and then the "About" button, I get the message "Free Pascal IDE for Win32 for i386. Target CPU: i386".

However, my computer shows the following data:
OS: Windows Seven, 64 bit.
RAM: 6 G.

The problem is as follows:
When I add the directive {$mode objfpc} in the beginning of the my structure (indicated in the beginning of this thread), the compiler presents the messsage "data element too large".

Additionally, even without adding the directive {$mode objfpc}, when I replace the arrays of records by arrays of pointers to records, and try using the reserved word NEW to allocate memory for all of the pointers, the program exits (with exitcode=203) before it completes its task.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version