- 1. 確定 platform.bib 有 power handle 的 driver 都禁止 paging, 可以透過設定 SHK 或 SHM 的方式達成.
- 2. 用 dumpbin /exports *.dll > C:\commondll.txt 後搜尋所有 driver 有 PowerUp 的 driver 如果在 common.bib 中載入的 flag 是 SH (user mode) 加上 M 成為 SHM.
更動的 driver 如下:
btagsvc.dll btmodem.dll btsvc.dll softkb.dll uiproxy.dll
問題產生原因在於 WinCE 的 Virtual Memory Paging 策略:
- 1. WinCE 沒有像 WinXP 的 Page File, 因此在 paging 時會將 user mode driver "page out".
- 2. power handle function 應禁止 paging.
- 3. common.bib 某些 driver 有 power handle function 卻是在 user mode 下執行.
WinCE Virtual Memory Basic Terms:
- 1. committed = have PM assigned to them.
- 2. reserved = assigned to an allocation, but don't have PM assigned to them.
- 3. free = not assigned, not allocated.
WinCE Virtual Memory Notes:
- The page next to each other in VM(Virtual Memory) may not next to each other in PM(Physical Memory).
- It's not one to one mapping, two VM address could mapping to same PM address.
- WinCE has no page file, so they will "delay committing" as long as possible.
What is Virtual Memory
http://blogs.msdn.com/ce_base/archive/2006/10/30/What-is-Virtual-Memory.aspx
Paging and the Windows CE Paging Pool
http://blogs.msdn.com/ce_base/archive/2008/01/19/Paging-and-the-Windows-CE-Paging-Pool.aspx
其他 MSDN 上的資料
Paging Pool
http://msdn.microsoft.com/en-us/library/aa915364.aspx
Paging Pool: Windows CE 5.0 vs. Windows Embedded CE 6.0
http://msdn.microsoft.com/en-us/library/aa909043.aspx
Slaying the virtual memory monster
http://blogs.msdn.com/hegenderfer/archive/2007/08/31/slaying-the-virtual-memory-monster.aspx
沒有留言:
張貼留言