我需要增加最大可能的数组大小

时间:2022-11-12 21:31:00

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.

我在带有32位Windows 7操作系统的Coure2Duo PC上安装了4GB Ram。我将分页大小增加到106110MB。但在完成所有这些之后,我无法显着增加最大阵列大小。

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.

请尽早帮助我。我甚至无法以双格式读取48 + MB大小的文件。

2 个解决方案

#1


3  

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.

为了清理MATLAB的内存,你可以做两件事。由于您使用的是32位版本的程序,因此通常限制为2GB内存。打开程序时使用/ 3GB开关可为该程序提供额外的1GB RAM。

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.

其次,您应该考虑使用pack()函数,该函数重新安排RAM中的变量以释放更多连续的内存空间。这最重要的是影响您打开单个数组的能力。

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.

请记住:您可以通过将可用内存量除以变量类型的大小来确定数组将保留多少项。双变量每个占用8个字节。您的129MB可用空间应允许单个阵列中的大约1685万个双值。

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

您可以使用MATLAB中包含的内存函数查看有关内存使用情况的信息。

  • memory shows the memory information
  • 内存显示内存信息

  • inmem will show you the variables and functions stored in memory
  • inmem将显示存储在内存中的变量和函数

  • clear will allow you to clear the memory of specific variables or functions.
  • clear将允许您清除特定变量或函数的内存。

#2


0  

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.

您可以尝试设置3GB开关,这可能会增加可能的内存。否则:切换到64位操作系统。您的系统浪费了547MB的RAM,因为它没有地址。

#1


3  

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.

为了清理MATLAB的内存,你可以做两件事。由于您使用的是32位版本的程序,因此通常限制为2GB内存。打开程序时使用/ 3GB开关可为该程序提供额外的1GB RAM。

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.

其次,您应该考虑使用pack()函数,该函数重新安排RAM中的变量以释放更多连续的内存空间。这最重要的是影响您打开单个数组的能力。

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.

请记住:您可以通过将可用内存量除以变量类型的大小来确定数组将保留多少项。双变量每个占用8个字节。您的129MB可用空间应允许单个阵列中的大约1685万个双值。

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

您可以使用MATLAB中包含的内存函数查看有关内存使用情况的信息。

  • memory shows the memory information
  • 内存显示内存信息

  • inmem will show you the variables and functions stored in memory
  • inmem将显示存储在内存中的变量和函数

  • clear will allow you to clear the memory of specific variables or functions.
  • clear将允许您清除特定变量或函数的内存。

#2


0  

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.

您可以尝试设置3GB开关,这可能会增加可能的内存。否则:切换到64位操作系统。您的系统浪费了547MB的RAM,因为它没有地址。