|
Win32 Subsystem 은 Desktop Heap이라는 Kernel Mode Internal Heap을 사용한다. 여기서 말하는 Desktop 이라는 것은 Windows, menu와 같은 user interface objects를 가지고 있는 논리적인 display surface 를 의미한다. 그러므로, Desktop heap은 이와 같은 user interface objects를 저장하고 있는 메모리 영역이다. 그러므로, 이러한 Heap 영역이 고갈되었을 경우는 화면이 깨지거나 Window가 생성되지 않거나 등등 Win32k.sys나 User32.dll과 관련이 있을만한 일이 발생할 수 있다. 대표적으로 임의의 Process 수행 시에 STATUS_DLL_INIT_FAILED(0xC0000142) 오류가 user32.dll에서 발생하는 경우를 경험할 수 있다. Desktop Heap Monitor 는 이러한 Heap 영역을 monitoring 하는 도구이다. http://www.microsoft.com/downloads/details.aspx?familyid=5cfc9b74-97aa-4510-b4b9-b2dc98c8ed8b&displaylang=en에서 Public 하게 download 받을 수 있다. 그리고, Desktop Heap Monitor의 설정방법은 문서 Error message that is similar to the following when you try to install the Desktop Heap Monitor tool: "dheapinst - Win32k.sys symbol load error, correct symbol required" http://support.microsoft.com/kb/914216 를 참조할 수 있다. (DheapMon은 Vista에서 지원하지 않는다) Desktop Heap Information Monitor Tool (Version 7.0.2727.0) Copyright (c) 2003-2004 Microsoft Corp. ------------------------------------------------------------- Session ID: 0 Total Desktop: ( 5824 KB - 8 desktops) WinStation\Desktop Heap Size(KB) Used Rate(%) ------------------------------------------------------------- WinSta0\Default 3072 5.7 WinSta0\Disconnect 64 4.0 WinSta0\Winlogon 128 8.7 Service-0x0-3e7$\Default 512 15.1 Service-0x0-3e4$\Default 512 5.1 Service-0x0-3e5$\Default 512 1.1 SAWinSta\SADesktop 512 0.4 __X78B95_89_IW\__A8D9S1_42_ID 512 0.4 ------------------------------------------------------------- 권고하지는 않지만 individual Desktop heap은 Configuration이 가능하다. Desktop heap 할당에 대해서는 다음의 registry에서 제어할 수 있다. HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems\Windows 해당 Windows Value의 default value 는 다음과 같다. %SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,3072,512 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16 상위 value 의 “SharedSection=” 부분에서 Desktop heap할당을 실제로 제어할 수 있는 데, 해당 값들의 의미는 다음과 같다. - 1024: 모든 Desktop 의 일반적인 shared heap size(1024 Kbytes). 이 값은 건드리지 않는 다. - 3072: Interactive window station과 관련된 각 Desktop heap size (3072 Kbytes), 그러므로, Hooks나 Menu, Windows 그리고 String 같은 Objects는 해당 Memory 영역을 소비한다고 보면 된다. - 512: Non-interactive window station과 관련된 각 Desktop 을 위한 Desktop heap size(512 Kbytes) 조절하는 방법에 대해서는 예를 들어, 하나의 Desktop Heap의 Size가 부족해서 문제가 된다면, 2, 3번째 값을 기본값보다 크게 설정한다. 또 다른 예로 Non-interactive desktop 개수 자체를 증가시키길 원한다면, 3번째 값을 기본값에 비해 작게 설정하면, 더 많은 desktop 이 생성될 수 있다. 실제, Handle leak이나 desktop Heap Leak에 대해서는 Kernel Dump를 수집할 필요가 있다. Handle Leak에 대해서는 Link http://www.dumpanalysis.org/blog/index.php/2007/07/15/crash-dump-analysis-patterns-part-13b/ 를 참조, 그리고, Desktop Heap Usage에 대해서는 Kernel Debugger가 제공하는 Userkdx extension을 이용할 수 있다. Userkdx.dll user Extension ddesk -vh <pdesk> - Displays objects allocated in desktop
|
카테고리
이글루링크
최근 등록된 덧글
글 잘 읽었습니다 .
전 ..
by 위시 at 11/26 어렷다 by klhk at 11/09 dhjjgbem by kl at 11/09 17번부터 어떻게 접는지.. by tykim0131 at 10/28 ATL이나 MFC를 이용하.. by 김명신 at 09/24 복원되었군요.. 제 RSS.. by 강세윤 at 09/24 허걱, 하고 있는 것으로.. by 강세윤 at 09/15 RSS 주소 서비스는 안 .. by 정성태 at 09/15 다시 보고 싶군요. by 강세윤 at 09/14 마악하임 ㄱ-;;; ㅋㅋㅋ.. by ㅋㅋㅋ at 09/13 이글루 파인더
| |||