![]() ![]() DLLs loaded only by this process) Fragmentation can be an issue Address space can effectively be exhausted prematurely Basic performance counters don’t provide enough information to troubleshoot Fragmented Address Space Most virtual memory problems are due to a process leaking private committed memory Heap, GC heap, language heaps (CRT) Private Bytes only tells part of the story Doesn’t account for shareable memory that’s not shared (e.g. Task Manager only lets you see private bytes Before Vista: column called “VM Size” Vista and later: column called “Commit Size” Process Explorer shows both virtual size and private bytes Add 2 columns to process list Virtual Size Private Bytes Run Testlimit twice Testlimit -r Testlimit -m Note: if on 64-bit Windows, 32-bit Testlimit can grow to 4GBġ3 Understanding Process Address Space Usage EXE, DLL, shared memory, other memory mapped files) Free (not yet defined)ġ1 Why Reserve Memory? Reserved memory lets an application lazily commit contiguous memory Used for stack and heap expansion Committed Stack Grows Down Committed Thread Stack Guard Reserved Guard Reserved Before Expansion After Expansion process heap) Reserved or committed Shareable (e.g. X64 today supports 48 bits virtual = 262,144 GB = 256 TB IA-64 today support 50 bits virtual = 1,048,576 GB = 1024 TB 64-bit Windows supports 44 bits = 16,384 GB = 16 TB 圆4 32-bit process on 圆4 8 TB Per-Process Space 4 GB Per-Process Space 8 TB System Space 8 TB System Space 7Ĭommitted: in-use Reserved: reserved for future use Address space breakdown Private (e.g. 3GB and /USERVA can extend process address up to 3 GB Process must be marked “large address space aware” to use memory above 2 GB Default 3 GB user space 3 GB Per-Process Space 2 GB Per-Process Space 2 GB System Space 1 GB System Space 7ĩ 64-bit Address Spaces 64-bits = 2^64 = 17,179,869,184 GB 圆4 Windows has demand-paged memory management Processes “demand” memory as needed There is no swapping A page is 4 KB (8 KB on Itanium) Allocations must align on 64 KB boundaries Large pages are available for improved TLB usage x86: 4 MB X64 and x86 PAE: 2 MB Itanium: 16 MB There is NO (will, almost no) connection between virtual memory and physical memoryĨ 32-bit x86 Address Space 32-bits = 2^32 = 4 GB Default 3 GB user space Sysinternals Vmmap Process virtual and physical memory usage Sysinternals Rammap System physical memory usage Sysinternals Testlimit Test program to leak different kinds of memory Sysinternals tools are free at ![]() Process virtual and physical memory usage Operating system virtual and physical memory usage Crisply define memory-related terminology Highlight tools that reveal memory usage Describe ‘dark spots’ in memory analysis counters and toolsĤ Agenda Virtual Memory Physical Memory Hard to Track MemoryĪddress Space Usage Process Commit System Commit Physical Memory Working Sets Paging Lists Hard to Track Memoryĥ Tools We’ll Use Task Manager Sysinternals Process Explorer WCL405 Mysteries of Windows Memory Management Revealed Mark Russinovich Technical Fellow Windows Azure (created jointly with Dave Solomon)ģ Goals Deep dive on: Crisply define memory-related terminology Presentation on theme: "Mysteries of Windows Memory Management Revealed"- Presentation transcript:Ģ Mysteries of Windows Memory Management Revealed ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |