📜 ⬆️ ⬇️

Large-scale news release ReactOS No. 83

image

GDI memory usage


image
In the process of rewriting the graphics device interface support manager (GDI), Timo Kreuzer (Timo Kreuzer) was faced with what can only be called a monstrous waste of memory. The amount of allocated memory for created objects was always a full page, i.e. 4 KB, regardless of whether the object needs such a large amount of memory to store its attributes. This leads to a significant waste of memory, as well as to the expenditure of memory addresses. Timo suggests that this is one of the reasons why many pages of memory are leaked in the task manager at once. In Win32k, there is a caching mechanism for such allocations, which, apparently, does not reuse the freed pages, so all of the system’s memory may be exhausted for a certain amount of time.

Fortunately, Timo managed to solve these problems. He developed memory pools for each type of object attribute for each process. Whenever an object is created or destroyed, memory is allocated or released in these pools. Pools are organized into sections, the size of which varies from one page in 4 Kb to 64 Kb. Each pool starts with one partition, if necessary, more of them can be added, but the total amount of memory allocated during each creation of an object does not exceed the actual amount required for each attribute. To denote free memory segments of each pool, a bitmap is used, while the search for available memory is much faster than before, when the paging method of each attribute of an object was used when it was created.

In addition to increasing speed and getting rid of wasted memory, pools also eliminate the need for an old caching mechanism. Pools themselves act as a kind of cache, containing a reserve of memory that is quickly available for use during object creation. Thus, Win32k does not need any additional mechanisms designed to process old blocks of memory and prepare them for reuse for new objects.

New USB Driver


')
Johannes Anderwald (Johannes Anderwald) worked on a wide range of ReactOS components, from core to Win32k and sound support, and now he is working on USB. Having shown interest in the introduction of USB support, he proposed to Michael Martin (Michael Martin) to rewrite the USB drivers from C to C ++ to make them easier to read and support. Michael agreed and fully focused all his activities on the new EHCI driver. Their current goal is to refine this driver to such a state that its functionality is comparable to the functionality of the old EHCI driver written by Michael. It was decided to abandon the development of the old driver before moving on to the development of the usbhub driver, responsible for sending I / O request packets to the EHCI driver.

Summer of Code Projects



The ReactOS project was allocated a limit of six vacancies under the Google Summer of Code, and all information about selected projects was posted here . For personal reasons, I did not have enough time to cover the essence of these projects in more detail.

TCP / IP driver


There have already been quite a few attempts to introduce a high-quality implementation of the TCP / IP protocol in the ReactOS network stack. The latter was to use the oskit library to support TCP / UDP, but its integration, as it turned out, is a very, very complex process. In any third-party library we use for us, the first place is the possibility of an easy update when a new version is released by another project. If the code requires its close integration with the system, the task is much more complicated. The lwIP library is intended primarily for use in embedded systems, making them very light and autonomous. We hope that we can successfully integrate it into the ReactOS network stack.

Explorer_New


Work on the new shell began several years ago by Thomas Blumel (Thomas Bluemel) and was continued by Andrew Hill (Andrew Hill). Most of the missing functionality is a consequence of the incomplete implementation of the shell32 library; it is mainly the readiness of explorer_new that depends on its readiness. Thus, work on explorer_new also implies work on the Shell32 library. There are already a large number of developments for this project, but it will take a lot of effort to complete it.

Theme support


Support for themes is one of the most requested features in ReactOS, although most often users are asked to introduce it only if they think that more people will be attracted to the beautiful user interface. It also belongs to the little documented components of Windows, and therefore there are difficulties in its proper implementation. Nevertheless, Yiannis Adamopoulos (Giannis Adamopoulos) has conducted research in this direction and believes that it can do the implementation of this component.

Audio stream mixing


Although Johannes Anderwald was able to achieve some success in working on the ReactOS sound stack, there is still a lot to be done to develop support for the simultaneous management of several audio streams. This is an extremely necessary functionality, especially if the user has an audible notification about events occurring in the OS or applications. ReactOS currently supports these functions very poorly, so having an audio mixer would help make the system much more usable.

Kernel mode test suite


This is what Amine Khaldi was so keen on, because a set of tests directly interacting with kernel functions could significantly speed up and facilitate the search for problems that lead to ReactOS boot failures or disrupt the normal functioning of the system. It is also interesting to see how they will be implemented, because if an unsuccessful test passes, the likelihood of a critical failure in the OS is high.

GDI Font Driver


A couple of years ago in one of the news releases I described in some detail the problems associated with drawing fonts in ReactOS. If you are interested in the details, you can get acquainted with them here. In short, the rendering method in ReactOS turned out to be completely wrong and we ignore most of the information provided by the glyphs. A proper font driver could solve this problem and save us from another big flaw in the Win32 subsystem architecture.

Another developer



Gabriel Ilardi (Gabriel Ilardi) some time ago received a commit-access, but since he was absent from the IRC channel for several weeks, this fact jumped out of my head when I wrote a previous news release. In any case, please welcome one more developer to join our ranks.

In the translation involved: evilslon , Farwalker , serrox

Source: https://habr.com/ru/post/118516/


All Articles