Question : Problem: virtual memory concept, desktop vs mobile device

Hi Experts
    The virtual memory concept on desktop can be understood very easily.
Every virtual memory space is mapped to a physical memory space, be it on RAM
or on a hard disk drive. Its purpose is to allow programs to use more memory than
is acctually available on the computer's RAM by utilizing the hard disk drive.
So the maximum amount of RAM a developer can use is limited by the size of the computer's
RAM and its hard disk space. So 'Max Virtual Address Space' = 'RAM Size' + 'HD Size'.

On Windows CE, and in Windows mobile in particular, its device is typically limited to only about
32MB of RAM, with the limit of 32MB of usable virtual memory space per process.
Now this is where i am getting confused..

1) From my memory, only a maximum of 32 processes can be running at the same time.
   With this design, wouldn't it be impossible to map each process's virtual memory's page to a
   physical memory's page just like how desktop's virtual memory scheme works?
   In other words, there is no one-to-one mapping or many-to-one mapping (shared library, dll) from virtual address space to physical memory.

2) To make matters more confusing, the newer version of windows ce 6 increased the virtual address space of each process from 32MB to 2GB.
   Win CE developer stated that
   * "People have asked, does the fact that Windows CE 6 changes from having 32MB of virtual memory per process to 2GB of virtual memory per process mean that CE 6 devices now require more RAM? And the answer is, absolutely not. Our address space just became sparser -- there are more free gaps between allocations."
   But what is the point when only the actual 32MB RAM (assuming the device only support 32MB) is available? In other words, what is the point of having more virtual address space's memory than physical memory only to found out that the call fails when you try to 'commit' the mapping between the virtual page and physical page?
My only guess is that each process can have more shared library, or dlls mapped to its virtual address space.

* http://www.windowsfordevices.com/articles/AT7967807599.html

Answer : Problem: virtual memory concept, desktop vs mobile device

Maybe http://msdn2.microsoft.com/en-us/library/aa914933.aspx ("Virtual Memory Layout: Windows CE 5.0 vs. Windows Embedded CE 6.0 ") can help a little:

"Before Windows Embedded CE 6.0, there was a limit of 32 processes, and a 32 MB limit on virtual memory (VM) for each process. Also, all of the processes shared the same 4 GB address space. For CE 6.0, the kernel process resides in the upper 2 GB of the 4 GB (32 bit) virtual memory space, and the bottom 2 GB is unique for each process. There is a limit of about 32,000 processes due to the number of handles that can be created. The practical limit on the number of processes is bounded by the amount of physical memory."
Random Solutions  
 
programming4us programming4us