เทคนิค ถาม และ ตอบ

[CE Technical Tip] What is Virtual Memory?

  • no.2542
  • 2013-03-19

# Thursday, November 16, 2006 11:13 AM by ce_base

One thing I hinted at, but didn`t say outright, is that pages and the page tables are actually defined by the processor specification. The CPU itself is actually walking the page tables to look up addresses, so the page table format is defined by the hardware spec. So, the 4KB page size is dictated by the processor. All of the processors that CE runs on today use 4KB page sizes. CE used to also support 1KB pages on the SH3 processor, but we don`t support SH3 anymore. Someday in the future, perhaps we`ll support another processor with different page sizes.
I don`t have a clear answer about the 64KB virtual allocation granularity. I think one part of it is that Win32 on desktop Windows had that restriction. I suspect part of the answer is about cache coherency. I know that if you try to point two virtual addresses at the same physical page, you`d better have that page at the same 64KB offⓢetin both virtual addresses or make them both uncached, or risk caching problems. e.g. If you copy the fifth page in one 64KB cluster to another virtual address, it has to be the fifth page of its destination 64KB cluster as well. This too is dictated by hardware. However I don`t really have a clear way to link this page aliasing problem to "all allocations are 64KB aligned." Maybe it was just a Win32 implementation detail, that "big" Windows tracks virtual allocations in 64KB chunks.


# Thursday, November 16, 2006 4:17 PM by Alex

Hi Sue! Thanks for your reply. Regarding allocation granularity on the desktop there was an interesting blog post here: http://blogs.msdn.com/oldnewthing/archive/2003/10/08/55239.aspx. But it sounds like a story from old days. :)


# Monday, December 04, 2006 10:39 AM by ce_base

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


# Wednesday, December 06, 2006 9:26 PM by Asang Dani

Hello Sue,
Your comment about cache coherency inspired me to write a small article on my blog. For those who are interested, it`s at:http://goembedded.ksetindia.com/?p=69


# Paging and the Windows CE Paging Pool
Sunday, January 20, 2008 12:29 AM by Windows CE Base Team Blog
Posted by: Sue Loh I’d like to explain a little more about memory management in Windows CE. I already