Gamestudio Links
Zorro Links
Newest Posts
Zorro 3.01 recoded MMI function issue
by 11honza11. 06/13/26 11:40
How to select between IB accounts by script?
by Jack_Zodiac. 06/12/26 23:17
Zorro tutorial ideas?
by pr0logic. 06/12/26 13:36
Max Number of Strategies in /Strategy folder
by Martin_HH. 06/12/26 08:50
Stooq now requires an API key
by AndrewAMD. 06/11/26 17:55
Z9 getting Error 058
by k_ivan. 06/10/26 14:38
ZorroGPT
by TipmyPip. 06/10/26 13:07
Z12 live performance
by alx. 06/09/26 20:42
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (Quad, TipmyPip, 1 invisible), 2,064 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Is there a table (matrix) size limit? #372232
05/30/11 16:16
05/30/11 16:16
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
I was wondering if in gamestudio there is any limit in the size of a table/matix/multidimentional-array?
My code seems to not work when I use huge ones.

for example:
var WORLD[4000][2000][2]; seems to load fine but...
var WORLD[4000][4000][2]; dosnt work, anyone know why this is?
Is there a limit to the size?
I can't seem to find any information on this in the manual.

I don't think memory should be an issue since 3GB ram should be enough for that I think

(using A7 commercial)


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: Is there a table (matrix) size limit? [Re: Carlos3DGS] #372236
05/30/11 17:02
05/30/11 17:02
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
4000 x 2000 x 2 x 4 Bytes = 64000000 Bytes => 62500 KB => 62 MB

4000 x 4000 x 2 x 4 Bytes = 128000000 Bytes => 125000 KB => 122 MB

Is your nexus big enough?
it has to be more than 122 MB!
i think default is 120 MB, but i don't know...
Think about your memory and increase the nexus...


Visit my site: www.masterq32.de
Re: Is there a table (matrix) size limit? [Re: MasterQ32] #372238
05/30/11 17:25
05/30/11 17:25
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
Thankyou, so far I have been searching the manual on what you said but all variables I found to be relevant seem to be read-only.

nexus -> read only (default 40mb)
max_nexus -> read only (ramge 0 - 200000)
sys_memory -> read only

What I dont understand is if nexsus has a default setting it implies it can be modified so why is it read only?
Same goes for max_nexus, if it can be set to a range from 0 to 200000 why is it listed as read only?
Very strange...


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: Is there a table (matrix) size limit? [Re: Carlos3DGS] #372242
05/30/11 18:10
05/30/11 18:10
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
you have to start the engine with -nx ... to change the nexus size. of course it can't be changed during runtime.
btw. i'd never allocate that much memory on the stack.

Re: Is there a table (matrix) size limit? [Re: Joey] #372257
05/30/11 19:56
05/30/11 19:56
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: Joey
i'd never allocate that much memory on the stack.

It shouldn't be on the stack if its a global array. I would also doubt that nexus affects it because the nexus is in the heap and the array should (if Lite-C does it this way) linked into the binary and managed by the binary loader.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Is there a table (matrix) size limit? [Re: WretchedSid] #372261
05/30/11 20:07
05/30/11 20:07
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
Thanks for the info.

Playing around with -nx it solved both this problem and another crash I sometimes had. I dont understand why but LOWERING the nexus size seemed to solve both problems. I dont understand...
Could anyone also look into my other thread and explain why both these problems occured and why lowering -nx fixed the problem? I dont seem to fully understand how the nexus works.

my other thread is:
Script crash only when debugger run. Engine or script problem?
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=372240#Post372240


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: Is there a table (matrix) size limit? [Re: Carlos3DGS] #372265
05/30/11 20:18
05/30/11 20:18
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Lowering the nexus for sure did not "solve" your problem. It just may cause that a certain problem has no effects. Until you don't post your code we can't tell you why it crashes.


Always learn from history, to be sure you make the same mistakes again...

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1