Page 1 of 1
muit dimentional array size limts?
Posted: Sun Sep 21, 2003 4:13 am
by Dreglor
i was testing my 3d engein and i came across a error
i couldnt find what it was causing until i reduced the size of the array
what i had was 2D array and i had the size of it 1,000,000 on both indexs
so it look like this
Code: Select all
#HW_limit.l=1000000
Dim O_vertex_X.f(#HW_limit,#HW_limit)
theres no error initalizing it but when you try to put an value into the array it gives an error
i not sure what the limt on it is but could some one point this out to me ,it would be very useful, right now all i know is it is between 10000 and 100000
it would be very useful
Posted: Sun Sep 21, 2003 9:42 am
by Pupil
i think you ran out of memory on that array as it consumes 1000000*1000000*4 bytes = 10e12 * 4 bytes which translates to approx. 3725 GByte
Rougly you can say that the limit is the amount of memory installed + maybe some swap memory..
Posted: Sun Sep 21, 2003 7:12 pm
by Dreglor
your proably right but you think that it would crash when i was initalizing it
edit
you are right, i did that formula you did to find how much memory an array will take and useing 10000 (which works) takes up 400meg of space (i have 512meg)
Posted: Sun Sep 21, 2003 8:14 pm
by GPI
> 400meg
Wow, i'm the only one, who think, that is realy to much...
Posted: Sun Sep 21, 2003 9:28 pm
by Dreglor
>>1000000*1000000*4 bytes = 10e12 * 4 bytes which translates to approx. 3725 GByte
well i did it on my calulator and it came out as 4 terrabytes (4000gigs)
werid?
i cheaked it like 4 times...
i used the windows calulator mabey thats why...
Posted: Sun Sep 21, 2003 9:43 pm
by jack
1 K=1024 bytes, 1 Meg=1048576 bytes, 1 gig=1073741824 bytes 8O
Posted: Sun Sep 21, 2003 11:18 pm
by Dreglor
hmm thanks for poiting that out jack,
i always gone by 1000
wonder why they have it like that?
1024bytes=2048bits...
Posted: Sun Sep 21, 2003 11:29 pm
by LarsG
Dreglor wrote:
hmm thanks for poiting that out jack,
i always gone by 1000
wonder why they have it like that?
1024bytes=2048bits...
No dude.. 1024 bytes is not 2048 bits... 1024 bytes = 8192 bits... (8 bits in a byte)
why 1024 etc.. it's because that's the way the binary and hexdecimal counting methods work...
-Lars
Posted: Sun Sep 21, 2003 11:31 pm
by Dreglor
ooooOOOOOooooh now i get it
Posted: Sun Sep 21, 2003 11:33 pm
by LarsG
Dreglor wrote:
ooooOOOOOooooh now i get it
Hehe... easy once you understand it, isn't it?!?
-Lars
Posted: Mon Sep 22, 2003 4:37 pm
by GPI
Some notes:
8Bit=1Byte
1024 Byte = 1 KiloByte
1024 KB = 1 MegaByte
1024 MB = 1 GigaByte
1024 GB = 1 TerraByte
Some intelligent Persons have calculated, that the complete knowledege of the mankind can be stored in 14 Terrabytes...
Note: 8Kb=1KB (Kb=KiloBit KB=KiloByte)
And Important: Producers of HDDs calculate wrong, they calculate with 1000!
GPI
Posted: Tue Sep 23, 2003 9:22 am
by Rings
4 bits = 1 nibble
16 bits = 4 nibbles or quad-nibble (older amiga- or C64 - user remember NibbleCopy ?)
16 bits in german -> Drunken already

Posted: Tue Sep 23, 2003 4:58 pm
by GPI
And don't forget:
2 Bytes = 1 Word
2 Word = 1 Long
Posted: Tue Sep 23, 2003 6:19 pm
by GedB
Dreglor,
What on earth are you using an array that size for?
Tell us, I'm sure somebody can suggest a better data structure.
Posted: Tue Sep 23, 2003 6:33 pm
by Dreglor
i doing a 3d engein (probably in the worst possible way) the arrayS are for vertex's x, y, z on a singel object and i also have it set up so faces can be defineded by the ids of the vertexs and the object
i am also useing an object oriented system (if you havn't already noticed) so that bumps up most arrays up one more dimention