Multi dimensional array size
#2

Depends on how much memory your server has.

You can calculate how many cells you have, just by multiplying the indexes.

Supposing that MAX_HOUSES is 1000, MAX_FURNITURE is 500, and HOUSE_FUR is 100:

1000x500x100x4 = 200000000.

Sou you have 200 million bytes of memory alocation.

You can convert it into megabytes to a better understanding.

200000000 divided by 1024 = 192315,5 kbytes.
192315,5 divided by 1024 = 190,73 mbytes.

I'm sure your server can handle 190,73 MB. But the question is, you really need that much memory?

Don't forget you'll have to run another arrays and another programs.

Adjust your array to occupy less memory if you want to.
Reply


Messages In This Thread
Multi dimensional array size - by Albon - 17.02.2015, 02:06
Re: Multi dimensional array size - by arakuta - 17.02.2015, 02:20
Re: Multi dimensional array size - by Albon - 17.02.2015, 02:34
Re: Multi dimensional array size - by Pottus - 17.02.2015, 02:43
Re: Multi dimensional array size - by Albon - 17.02.2015, 02:48
Re: Multi dimensional array size - by Albon - 17.02.2015, 03:54

Forum Jump:


Users browsing this thread: 1 Guest(s)