MATLAB out of memory

Source: Internet
Author: User

When running the LTE simulation platform, I encountered an out of memory problem. I went online for a while and found some solutions. Here I will summarize them.

The generation of out of memory is generally dueProgramDuring the running process, the memory is constantly read and written, resulting in a decrease in the number of consecutive memory segments. Here we will mainly learn some non-Program Improvement Methods and solve this problem by setting the system.

1. How to view available memory in MATLAB?

Enter feature ('memstats') in the Command window of MATLAB to obtain the following results:

Physical memory (RAM ): In use: 1499 MB (5dba0000) Free: 1571 MB (6237e000) Total: 3071 MB (bff1e000) Page file (swap space ): In use: 1694 MB (69e67000) Free: 4446 MB (115e1e000) Total: 6140 MB (17fc85000) Virtual Memory (address space ): In use: 633 MB (279fe000) Free: 1413 MB (585e2000) Total: 2047 MB (7ffe0000) Largest contiguous free blocks: 1. [at 22 cb0000] 1239 MB (4d750000) 2. [at 7da16000] 28 MB (1cda000) 3. [at 70856000] 17 MB (g0a000) 4. [at 77281000] 16 MB (Limit f000) 5. [at 7f7f0000] 6 MB (68f000) 6. [at 7ae71000] 6 MB (60f000) 7. [at 7cd15000] 5 MB (5eb000) 8. [at 7409e000] 5 MB (5d2000) 9. [at 72b63000] 5 MB (53d000) 10. [at 71ab3000] 4 MB (4fd000) ======================== 1336 MB (53868000)   Ans =   1.2995e + 009

We can see that the virtual memory is only 2 GB and there is room for improvement. Consider how to increase the virtual memory.

2. How to Improve the virtual memory? Does the increase in system virtual memory mean the increase in MATLAB virtual memory?

Method 1: Use win7. Right-click the computer → properties → advanced system settings → advanced → changes → cancel Automatic Management → Custom Size

Method 2: Use the following method to increase the virtual memory used for Matlab in win7 32-bit OS to 3 GB.
Set: Start --- all programs --- attachments, right-click the command prompt, and select "Run as administrator ",
Enter bcdedit/set increaseuserva 3072 and press enter to restart the computer.
Cancel: Start --- all programs --- attachments, right-click the command prompt, and select "Run as administrator ",
Enter bcdedit/deletevalue increaseuserva and press enter to restart the computer.

?
Physical memory (RAM ): In use: 1488 MB (5d082000) Free: 1582 MB (62e9c000) Total: 3071 MB (bff1e000) Page file (swap space ): In use: 1652 MB (6742b000) Free: 4488 MB (11885a000) Total: 6140 MB (17fc85000) Virtual Memory (address space ): In use: 1183 MB (49f0a000) Free: 1888 MB (760d6000) Total: 3071 MB (bffe0000) Largest contiguous free blocks: 1. [at 7fff0000] 1022 MB (3fe8f000) 2. [at 476d1000] 604 MB (25c8f000) 3. [at 6d366000] 46 MB (2eba000) 4. [at 70f53000] 30 MB (1e0d000) 5. [at 7dfd6000] 23 MB (171a000) 6. [at 45d90000] 19 MB (1350000) 7. [at 70226000] 11 MB (bfa000) 8. [at 72de4000] 8 MB (8ec000) 9. [at 23100000] 8 MB (800000) 10. [at 7f7f0000] 7 MB (7f0000) ======================== 1783 MB (6f725000)   Ans =   1.0722e + 009

We can see that the above method can increase the virtual memory of MATLAB. After this adjustment, the original simulation program can be run.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.