I suspect programmer error, but anyway:
-Ch<n>[,m] <n> bytes min heap size (between 1023 and 67107840) and optionally [m] max heap size
Usually and as standard the max heap size is simply available resources. Hence I think your code is not sound.
Do you properly release memory after use? AFAIK RealBasic has automatic memory management (and therefor sometimes slow), but in FPC you have to release the memory yourself.
Basically, when you try to port from FreeBasic to FreePascal (or C/C++ and others) you have to be aware of this: you need to control memory release yourself.
FreePascal should use less heap compared to RealBasic. Not more. The reason it works on some nixes is simply the behavior of swap files extending the heap. Windows supports that too, but not for heap without intervention. Anyway, that would be hiding coding errors.
Thank you for such a prompt reply and details of the heap etc.
I've spent 2 weeks on this because in my experience errors are almost ALWAYS caused by me and rarely by the development system itself.
Hopefully its the case here and I've overlooked something, it might help others.
My problem - the program never even reaches its splash screen before the GUI should then appear.
Once the GUI appears then the user can compile their project - this is when massive use of the heap would occur.
The way it works, the arrays are defined but left unpopulated, but once compilation/building of a user's project is underway, then the arrays massively use the heap as objects are created etc.
However, it never reaches this stage, by failing before the splash screen even loads.
Note, about adding code
For instance, if I add the code line "x=2" to my FPC project, the 203 error occurs, if I then delete the "x=2" line, the 203 error does not occur.
By the way, with the "x=2" removed, no 203 error. The project runs normally and can then can compile a users project, which implies that the FPC code and heap memory are separate.
Unfortunately I don't yet understand how FPC uses memory.
Ah - just occurred to me - it could be the FPC Debugger - it might need more space allocating for code symbols etc - i'll look into that.
This might be relevant for me: -
https://wiki.freepascal.org/Size_Matters