Re: max size of array

Tech-Archive recommends: Fix windows errors by optimizing your registry



I would suspect that it has to do with the amount of ram you have and how
large the elements of the array are.

Not counting the overhead involved with the setting up and maintaining the
array (Don't ask me, I don't know how much), you have 2,000,000 * 2 *
average field size bytes of space being used for this array.

Megabyte = 1 million bytes so very, very roughly
4 * average field size = number of megabytes needed to build the array. 40
character field can be 80 bytes (depending on character set)

4*80 = 320 megabytes of memory (plus overhead)

All of the above calculation being done early in the morning so now
guarantees that I didn't screw something up.

"Jesper F" <askfortheemail@xxxxxxx> wrote in message
news:uIIkNxjJGHA.3224@xxxxxxxxxxxxxxxxxxxxxxx
> I'm trying to fill a 2-dimensional array with ca. 2.000.000 records and
> I'm getting a 'out of memory' error. Is that due to limitations on my
> machine or in VBA or something else?
>
> Jesper
>


.



Relevant Pages

  • Re: The inaugural VB6 vs dot net test
    ... If you do Command1 first, ... Command2 operates on an array that already has been ... way than counting up loops. ...
    (microsoft.public.vb.general.discussion)
  • Re: sort algorithm
    ... To output the sorted list, just dump the counts array. ... distribution counting into bins took: ...
    (comp.programming)
  • Re: Using size_t clearly (appropriately?)
    ... a justification for using 'size_t' to represent array indices. ... designed to count the number of elements in an array of struct foobar. ... In general case 'size_t' is not applicable for counting objects at all. ... In general case it's range is not sufficient (16-bit platform again). ...
    (comp.lang.c)
  • Re: Using size_t clearly (appropriately?)
    ... a justification for using 'size_t' to represent array indices. ... designed to count the number of elements in an array of struct foobar. ... size_t has *at least* enough range for the purpose. ... If the language had a type to be used generically for counting ...
    (comp.lang.c)
  • Re: 0 based collections
    ... Visual Basic has in my opinion taken the right approach that counting start ... Zero other than Null. ... However, almost every collection and array in VBNet starts at Zero, with the ...
    (microsoft.public.dotnet.languages.vb)