I'm just using a traditional single-dementional integer array. If I'm reading your message correctly, each value requires 4 bytes?

----- Original Message -----
From: Thomas Ward <[email protected]
To: Gamers Discussion list <[email protected]
Date sent: Sun, 28 Jul 2013 12:49:18 -0400
Subject: Re: [Audyssey] looking for game programing help/advice

Hi John,

Well, that depends on a number of factors. The type of array, the size of the array, if it is multidimensional, etc. However, If you had a standard integer array of 1024 elements that would be equal to 4112 bytes, or approximately 4.1 MB of memory. That's just one dimension. If you have a 2d array of 1024 by 1024 you would square the amount of memory being used which equals 16908544 bytes or 16.8 MB of memory. My calculations might be slightly off, but the point is arrays will add up very quickly. The larger the array the more memory being used. On today's machines 16 MB of ram is nothing, but still if there is a more efficient less memory intensive way to do this it is a good idea to do
it if possible.

Cheers!

---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].

Reply via email to