How much memory do arrays use?

the_net_2.0

Banned
Local time
Today, 03:32
Joined
Sep 6, 2010
Messages
812
All,

I am using about 5 arrays in my procedure. Such as:

Code:
'SET ARRAY CONSTANTS (these are set based on observations of item counts in your project)
Const maxNumMods = 100
Const maxProcsInMod = 50
Const maxCallsInProc = 50

'SET ARRAYS (base 0)
Dim mods(maxNumMods) As String
Dim modsAndProcs(maxNumMods, maxProcsInMod) As String
Dim procsAndCalls(maxProcsInMod, maxCallsInProc) As String
Dim modsProcsAndCalls(maxNumMods, maxProcsInMod, maxCallsInProc) As String

I'm wondering how much RAM this is taking. I can always find out per my machine/google, etc... , but I'm wondering if some of you guys here can tell me what your experiences have been?

A better choice than nested arrays like this would be to store my information in tables, but I don't really want to because I will be running this one time on my work machine just to get a printout in a text file. Along with these arrays, a text file will be open via I/O while the procedure is running.

Thanks!
 
array of strings will be volatile

the array will be an array of pointers (however big a pointer is) to strings which i think are stored on the stack. (as space cannot be pre-allocated for variable strings)

arrays generally just use the calculated size in bytes, though, as any other variable
 

Users who are viewing this thread

Back
Top Bottom