MalikAnasAhmad
MalikAnasAhmad

Reputation: 71

I need to increase the Maximum possible array size

I have a 4GB Ram installed on Coure2Duo PC with a 32bit Windows 7 Operating system. I have increased the paging size up to 106110MB. But after doing all this I am not able to significantly increase the maximum array size.

Following are the specs

memory
Maximum possible array:             129 MB (1.348e+08 bytes) *
Memory available for all arrays:    732 MB (7.673e+08 bytes) **
Memory used by MATLAB:              563 MB (5.899e+08 bytes)
Physical Memory (RAM):             3549 MB (3.722e+09 bytes)

*  Limited by contiguous virtual address space available.
** Limited by virtual address space available.

Kindly help me on your earliest. I am not even able to read a file of 48+MB size in double format.

Upvotes: 6

Views: 4967

Answers (2)

philipthegreat
philipthegreat

Reputation: 244

There are two things you can do to clear up memory for MATLAB. Since you're using a 32-bit version of the program, you're normally limited to 2GB of memory. Using the /3GB switch while opening the program makes an additional 1GB of RAM available to that program.

Second, you should consider using the pack() function, which rearranges variables in RAM to free up more contiguous memory space. This, more than anything, is affecting your ability to open individual arrays.

Remember: you can figure out how many items an array will hold by dividing the memory amount available by the size of the variable type. Double variables take up 8 bytes each. Your 129MB of space available should allow around 16.85 million double values in a single array.

You can view information about memory usage using the memory functions included in MATLAB.

  • memory shows the memory information
  • inmem will show you the variables and functions stored in memory
  • clear will allow you to clear the memory of specific variables or functions.

Upvotes: 3

Daniel
Daniel

Reputation: 36710

You may try to set the 3GB switch, maybe this increases the possible memory. Otherwise: Switch to a 64 bit os. Your system wastes 547MB of RAM simply because there are no addresses for it.

Upvotes: 0

Related Questions