2

From this answer,https://stackoverflow.com/a/17478535/1727934 ,we could know that,Android doesn't support Virtual Memory.

Then from wikipedia, we could know that:

Paging is an important part of virtual memory implementations

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

But according to the official document,we can see that:

The Android Runtime (ART) and Dalvik virtual machine use paging and memory-mapping (mmapping) to manage memory.

https://developer.android.com/topic/performance/memory-overview.html

I'm confused about this:paging is used for virtual memory,but Android doesn't support virtual memory,so what does this paging means in Android?

Community
  • 1
  • 1
MichaelYe
  • 386
  • 4
  • 15

2 Answers2

2

The problem is that historically the terms logical memory translation and virtual memory translation have been conflated. Logical memory involves the mapping of logical pages to physical page frames. Virtual memory involves the mapping of logical pages to both physical page frames and secondary storage on disk. In the days of 8MB multi-user computers, logical memory and virtual memory were always used together.

Now that we have computers with gigabytes of memory there is a decreasing need for virtual memory where pages are moved between disk and memory. However, the benefits of logical memory translation remain.

The division of memory into logical pages mapped to physical page frames remains.

user3344003
  • 20,574
  • 3
  • 26
  • 62
  • Thanks for the answer.But that did not solve my problem,I'm still confused about why Android using paging,and whether the paging is used for Virtual memory? – MichaelYe Mar 29 '17 at 03:05
  • You can use paging (as in dividing the logical address space into pages) without virtual memory (as in saving pages to disk). – user3344003 Mar 29 '17 at 15:12
  • So the Paging here used by Android ,is just the way to archive better Sharing Memory, aim to Saving Memory,but not for virtual memory,right? – MichaelYe Mar 29 '17 at 15:30
  • That's it. And we are likely to see a lot more of this memory grows. – user3344003 Mar 29 '17 at 15:55
  • I think this answer should be improved. It should clearly state that (a) Virtual Memory is not just about swap space, and (b) Android does support it. – myself Oct 07 '19 at 11:12
0

In the paging memory management technique every process is given the impression that it is working with large, contiguous sections of memory. Physically, the memory of each process is dispersed across different areas (pages) of physical memory.

When we say that Android does not use virtual memory we mean that it does not move (paged out) unused pages into secondary storage (HDD, SSD, etc) to free up place for new pages as some OS does. Rather, all pages remain in physical (RAM) storage.

That is how i get it, correct me if I have mistaken. There is a video that I think will make it more clear.

fflores
  • 192
  • 1
  • 6