2

I have a new computer in my lab with 32GB of RAM and a newly installed MATLAB 2014b.

When I do

memory

I get:

Maximum possible array:     55973 MB (5.869e+10 bytes) *
Memory available for all arrays:     55973 MB (5.869e+10 bytes) *
Memory used by MATLAB:      1550 MB (1.625e+09 bytes)
Physical Memory (RAM):     32706 MB (3.430e+10 bytes)

Which kind of confuses me a bit. So, I can have an array of 55GB (wow, I'm quite amazed) on a computer with 32GB of RAM? How is this possible?

Adriaan
  • 17,741
  • 7
  • 42
  • 75
Ander Biguri
  • 35,140
  • 11
  • 74
  • 120
  • note the star (*) at the end, and read it the corresponding description: "Limited by System Memory (physical + swap file) available" – Amro Oct 30 '14 at 16:51
  • 1
    Virtual memory maybe? – Divakar Oct 30 '14 at 16:51
  • @Amro which means...? – Ander Biguri Oct 30 '14 at 16:54
  • @Divakar How does virtual memory works with Matlab? Can I USE it? – Ander Biguri Oct 30 '14 at 16:57
  • How can you use it? Refer to this link, looks helpful - http://www.mathworks.in/help/matlab/matlab_prog/resolving-out-of-memory-errors.html – Divakar Oct 30 '14 at 16:58
  • 1
    @AnderBiguri: See [here](https://en.wikipedia.org/wiki/Paging) to learn about swap/page file. Others have explained the concept of [virtual memory](https://en.wikipedia.org/wiki/Virtual_memory) much better than I can: http://superuser.com/questions/42854/what-is-virtual-memory-clarification-needed, http://stackoverflow.com/questions/4970421/difference-between-virtual-memory-and-swap-space – Amro Oct 30 '14 at 16:59
  • And to answer the original question,assuming virtual memory is the reason for that particular behavior, this statement about virtual memory in its wiki page makes sense - `"Software within the operating system may extend these capabilities to provide a virtual address space that can exceed the capacity of real memory and thus reference more memory than is physically present in the computer."` – Divakar Oct 30 '14 at 17:02
  • @Divakar Great! thanks! You two gave some lots of info in 30 secs. Should you answer the question with some links or I better delete my post (duplicate)?. – Ander Biguri Oct 30 '14 at 17:04
  • I think would be best if you collect all the details and post as an answer? It looks pretty on-topic to me and can't see any other reason for closing it. Duplicate of the links posted by Amro? Take your call on that. – Divakar Oct 30 '14 at 17:06
  • @Divakar Great! However I believe that any of you both should, as you have been the ones giving me the good answer. I will keep it open for a few hours and if you dont answer I'll do it myself. ;) – Ander Biguri Oct 30 '14 at 17:08

1 Answers1

2

As @Amro and @Divakar suggested, this is due to virtual memory. For other users as lost as me when asking the question, there are some very useful links to understand this:

  • Swap/page file:

https://en.wikipedia.org/wiki/Paging

  • Virtual memory:

https://en.wikipedia.org/wiki/Virtual_memory

https://superuser.com/questions/42854/what-is-virtual-memory-clarification-needed

What's the difference between "virtual memory" and "swap space"?

Community
  • 1
  • 1
Ander Biguri
  • 35,140
  • 11
  • 74
  • 120