
Advanced Memory Management Douglas Boling President Boling Consulting Inc. www.bolingconsulting.com MEDC DevCon 2005
Advanced Memory Management Douglas Boling President Boling Consulting Inc. www.bolingconsulting.com

Microsoft MEDC Mobile Embedded DevCon 2005 Las Vegas-May 9-12 MEDC

Speaker o Douglas Boling dbolingmedc bolingconsulting.com Author-"Programming Microsoft Windows CE 3rd Edition" o Trainer-Classes on Windows CE App Development Windows CE OAL Development Consultant Work with companies to help their application and platform development efforts MEDC Mobile Embedde DevCon 2005
Speaker Douglas Boling dbolingmedc @ bolingconsulting.com Author – “Programming Microsoft Windows CE 3rd Edition” Trainer – Classes on Windows CE App Development Windows CE OAL Development Consultant – Work with companies to help their application and platform development efforts

Windows Mobile Windows CE5.0 Windows Wadow Hardware/Drivers OEM/IHV Supplied BSP OEM Hardware and Standard PC (ARM,SH4,MIPS) Standard Drivers Hardware and Drivers Device Building Windows XP DDK Tools Platf-.ouilder Windows Embedded Studio Lightweight EDB SQL Server 2005 Express Edition Relational SQL Server 2005 Mobile Edition SQL Server 2005 Native Win32 MFC 8.0,ATL 8.0 Managed .NET Compact Framework .NET Framework server side ASP.NET Mobile Controls ASP.NET Windows Media Multimedia Directx Location services MapPoint Development Tools Visual Studio 2005 Internet Security and Acceleration Server communications Exchange Server Messaging Live Communications Server Speech Server Device Update Agent Management Image Update Software Update Services Tools Systems Management Server Microsoft Operations Manager
Management Tools Communications & Messaging Device Update Agent Software Update Services Live Communications Server Exchange Server Internet Security and Acceleration Server Speech Server Image Update Location Services Multimedia MapPoint DirectX Windows Media Development Tools Visual Studio 2005 MFC 8.0, ATL 8.0 Native Win32 Managed Server Side Lightweight Relational EDB SQL Server 2005 Express Edition Data Programming Model Device Building Tools Hardware/Drivers Windows XP DDK Windows Embedded Studio Platform Builder OEM/IHV Supplied BSP (ARM, SH4, MIPS) OEM Hardware and Standard Drivers Standard PC Hardware and Drivers SQL Server 2005 Mobile Edition SQL Server 2005 ASP.NET Mobile Controls ASP.NET .NET Compact Framework .NET Framework Microsoft Operations Manager Systems Management Server

Agenda oSlot Based Memory Model oDLL Loading Issues oManaged Applications MEDC
Agenda Slot Based Memory Model DLL Loading Issues Managed Applications

Virtual Address Space FFFF FFFF Kernel Mode Accessible in kernel Space mode only 80000000 User Mode Accessible in user and Space kernel modes MEDC 00000000 Mobile Embedde DevCon 2005
Virtual Address Space 0000 0000 FFFF FFFF User Mode Space 8000 0000 Kernel Mode Space Accessible in user and kernel modes Accessible in kernel mode only

Windows CE Memory Architecture ⊙ Windows CE uses a unified,4 Gigabyte virtual address space o The address space is divided into kernel and user mode spaces o Kernel mode code has access to the entire address space oUser mode code can only access the lower 2 Gigabytes MEDC DevCon 2005
Windows CE Memory Architecture Windows CE uses a unified, 4 Gigabyte virtual address space The address space is divided into kernel and user mode spaces Kernel mode code has access to the entire address space User mode code can only access the lower 2 Gigabytes

Windows XP Memory Map FFFF FFFF System Reserved (kernel mode space) 80000000 Application Space MEDC 00000000
Active Process Windows XP Memory Map System Reserved (kernel mode space) 0000 0000 8000 0000 FFFF FFFF Application Space

Windows CE Memory Map FFFF FFFF System Reserved (kernel mode space) 80000000 Large Memory Area (memory mapped files) 42000000 Reserved 04000000 Application Space MEDC 00000000 DevCon 2005
Windows CE Memory Map System Reserved (kernel mode space) 0000 0000 0400 0000 4200 0000 8000 0000 FFFF FFFF Active Process Application Space Active Process Reserved Large Memory Area (memory mapped files) Application Space

User Virtual Space 80000000 Resource o2 Gigabytes only DLLs (Slot 63) Divided into 64 32 MByte Slots 士arge Memory Area tmemory mapped fites 30 slots for LMA 42000000 o 31 slots for applications Application 2 slots for current Slots application (Slots 2-33) 1 resource slot Current 6888 Application (Slots 0-1)
0000 0000 0400 0000 4200 0000 8000 0000 Large Memory Area (memory mapped files) User Virtual Space Resource only DLLs (Slot 63) Application Slots (Slots 2-33) Current Application (Slots 0-1) 2 Gigabytes Divided into 64 32 MByte Slots 30 slots for LMA 31 slots for applications 2 slots for current application 1 resource slot