R
Robert W via JavaKB.com
In theory, how big can an array be before it becomes unmanageable? I know
this has some basis on the machine spec. However it is the proportions that I
am unsure about. Since an array initialises all it is values to 0 if they are
not specified at creation.
How much memory would a large empty array take?
For example:
Lets say I am writing a game engine (I'm not but for arguments sake) and I
have decided to use an array for collision detection. A moving object in the
game queries an array to see if that space is occupied. If it is then it
invokes a method that carries out the desired reaction (explodes, prevents
the objects movement, etc). The planned platform is to have 256 megs of free
RAM
Now if the game creates a 3d int array of [1000][1000][1000].
how much free RAM would remain, if any?
I would appreciate any thoughts...
Rob
this has some basis on the machine spec. However it is the proportions that I
am unsure about. Since an array initialises all it is values to 0 if they are
not specified at creation.
How much memory would a large empty array take?
For example:
Lets say I am writing a game engine (I'm not but for arguments sake) and I
have decided to use an array for collision detection. A moving object in the
game queries an array to see if that space is occupied. If it is then it
invokes a method that carries out the desired reaction (explodes, prevents
the objects movement, etc). The planned platform is to have 256 megs of free
RAM
Now if the game creates a 3d int array of [1000][1000][1000].
how much free RAM would remain, if any?
I would appreciate any thoughts...
Rob