Desktop Heap, part 2

 

Matthew here again – I want to provide some follow-up information on desktop heap. In the first post I didn’t discuss the size of desktop heap related memory ranges on 64-bit Windows, 3GB, or Vista. So without further ado, here are the relevant sizes on various platforms...

Windows XP (32-bit)

· 48 MB = SessionViewSize (default registry value, set for XP Professional, x86)

· 20 MB = SessionViewSize (if no registry value is defined)

· 3072 KB = Interactive desktop heap size (defined in the registry, SharedSection 2nd value)

· 512 KB = Non-interactive desktop heap size (defined in the registry, SharedSection 3nd value)

· 128 KB = Winlogon desktop heap size

· 64 KB = Disconnect desktop heap size

Windows Server 2003 (32-bit)

· 48 MB = SessionViewSize (default registry value)

· 20 MB = SessionViewSize (if no registry value is defined; this is the default for Terminal Servers)

· 3072 KB = Interactive desktop heap size (defined in the registry, SharedSection 2nd value)

· 512 KB = Non-interactive desktop heap size (defined in the registry, SharedSection 3nd value)

· 128 KB = Winlogon desktop heap size

· 64 KB = Disconnect desktop heap size

Windows Server 2003 booted with 3GB (32-bit)

· 20 MB = SessionViewSize (registry value has no effect)

· 3072 KB = Interactive desktop heap size (defined in the registry, SharedSection 2nd value)

· 512 KB = Non-interactive desktop heap size (defined in the registry, SharedSection 3nd value)

· 128 KB = Winlogon desktop heap size

· 64 KB = Disconnect desktop heap size

You may also see reduced heap sizes when running 3GB. During the initialization of the window manager, an attempt is made to reserve enough session view space to accommodate the expected number of desktops heaps for a given session. If the heap sizes specified in the SharedSection registry value have been increased, the attempt to reserve session view space may fail. When this happens, the window manager falls back to a pair of “safe” sizes for desktop heaps (512KB for interactive, 128KB for non-interactive) and tries to reserve session space again, using these smaller numbers. This ensures that even if the registry values are too large for the 20MB session view space, the system will still be able to boot.

Windows Server 2003 (64-bit)

· 104 MB = SessionViewSize (if no registry value is defined; which is the default)

· 20 MB = Interactive desktop heap size (defined in the registry, SharedSection 2nd value)

· 768 KB = Non-interactive desktop heap size (defined in the registry, SharedSection 3nd value)

· 192 KB = Winlogon desktop heap size

· 96 KB = Disconnect desktop heap size

Windows Vista RTM (32-bit)

· Session View space is now a dynamic kernel address range. The SessionViewSize registry value is no longer used.

· 3072 KB = Interactive desktop heap size (defined in the registry, SharedSection 2nd value)

· 512 KB = Non-interactive desktop heap size (defined in the registry, SharedSection 3nd value)

· 128 KB = Winlogon desktop heap size

· 64 KB = Disconnect desktop heap size

Windows Vista (64-bit) and Windows Server 2008 (64-bit)

· Session View space is now a dynamic kernel address range. The SessionViewSize registry value is no longer used.

· 20 MB = Interactive desktop heap size (defined in the registry, SharedSection 2nd value)

· 768 KB = Non-interactive desktop heap size (defined in the registry, SharedSection 3nd value)

· 192 KB = Winlogon desktop heap size

· 96 KB = Disconnect desktop heap size

 

Windows Vista SP1 (32-bit) and Windows Server 2008 (32-bit)

· Session View space is now a dynamic kernel address range. The SessionViewSize registry value is no longer used.

· 12288 KB = Interactive desktop heap size (defined in the registry, SharedSection 2nd value)

· 512 KB = Non-interactive desktop heap size (defined in the registry, SharedSection 3nd value)

· 128 KB = Winlogon desktop heap size

· 64 KB = Disconnect desktop heap size

Windows Vista introduced a new public API function: CreateDesktopEx, which allows the caller to specify the size of desktop heap.

Additionally, GetUserObjectInformation now includes a new flag for retrieving the desktop heap size (UOI_HEAPSIZE).

 

[Update: 3/20/2008 - Added Vista SP1 and Server 2008 info. More information can be found here.]