What does HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems\Windows\SharedSection do?

8,404

That key controls the limits of shared heap memory

Parallel processes often need the means to share data, so Windows provides a shared Heap (the heap is a pool of memory used for dynamic memory allocation) that multiple processes can access. Usually, Processes are completely isolated in the memory they can access, so shared memory structures allow them to collaborate.

Windows creates a System Heap, for all system processes, a Desktop Heap, for all processes running under a particular Interactive user session, and a Non-interactive desktop heap, for processes that run headless in a non-interactive session.

The syntax for the key you highlighted is:
SharedSection=[system],[desktop],[noninteractive]
All the values are in KB.

This registry key lets you configure each of the heaps, with the suggested setting increasing the shared heap available to the processes running under each interactive session from 3,072KB to 30,720KB

The setting seems safe enough; generally speaking, having more shared heap would let processes share more information, but in this case, its almost certainly done to support the creation of many processes whose threads perform tasks using shared memory.

Microsoft mentions Shared Heaps in conjunction with Direct3D and DirectX, which use them to store Textures, and also specifically mentions that shared heap can be used to map to data across multiple devices such as GPUs, and avoid marshaling of ram by the CPU.

Share:
8,404

Related videos on Youtube

user322364
Author by

user322364

Updated on September 18, 2022

Comments

  • user322364
    user322364 almost 2 years

    I watched a video on YouTube on how to squeeze performance out of an integrated GPU, with the video instructing to change the above registry key's data from SharedSection=1024,3072,512 to SharedSection=1024,30720,512:

    • What does this actually do?
    • How does this affect performance during gaming?
    • Is it safe?
    • Can't you do the same without using regedit?

    I googled it and all the answers were something about the number of concurrent policies, but I didn't understand it very well and couldn't find what this has to do with integrated GPU performance.

  • Admin
    Admin about 5 years
    In your opinion, how this impact gaming?
  • Frank Thomas
    Frank Thomas about 5 years
    well, in the IBM article I linked, their goal was to allow you to create and run a much larger number of parallel processes. if each process must create data on the heap, then the number of processes that can be created is eventually constrained by the size of the heap. Alternately, a more moderate number of processes could share more information. The degree to which either of these will impact your gaming experience will depend on how the game is implemented, and whether it is currently constrained by the default 3MB setting. it will have no effect at all, if 3MB is already enough.
  • Admin
    Admin about 5 years
    No my gaming, the OP's... Because that's their actual question. They watched some random Youtube video talking about this to squeeze performance out of an integrated graphics card and they want to know whether it's safe (probably yes) and how does this affect performance during gaming (likely to have no effect, me thinks).
  • Frank Thomas
    Frank Thomas about 5 years
    see my latest update for more information on how it is used in windows for 3D gaming. Keep in mind, these kinds of tweaks will only pertain to certain games that were coded to operate in specific ways. unless the advice is specific to a game, based on an experts assessment, then this is just a possible enhancement. its like buying more ram. it will only be useful you if you are already out of it, and everyone's own specific usecase will determine if its warranted.
  • Alexey Ragozin
    Alexey Ragozin about 5 years
    @frank-thomas shared heap is not a tree like data structure called heap. share heap is an area there memory blocks can be allocated and delocated dynamically. Heap the data structure is totally different think accidentally having same name.
  • JW0914
    JW0914 almost 4 years
    This is a comment, not an answer.