ReactOS Newsletter: Newsletter 83

Author: Z98. Link to original: http://www.reactos.org/ru/newsletter_83.html (English).
Tags: FOSS, GPL, Newsletter, ReactOS Submitted by evilslon 29.04.2011. Public material.
ReactOS Newsletter 83 by Z98 on 2011-04-28 - GDI Memory Usage - New USB Drivers - Accepted Summer of Code Projects - TCP/IP Driver - Explorer_New - Theme Support - Audio Stream Mixing - Kernelmode Testsuite - GDI Font Driver

Translations of this material:

into Russian: Выпуск новостей ReactOS № 83. Translation complete.
Submitted for translation by evilslon 29.04.2011 Published 6 years, 4 months ago.

Text

GDI Memory Usage

As part of his work rewriting the Graphics Device Interface (GDI) handle manager, Timo Kreuzer ran across what can only be described as an atrocious waste of memory. The memory allocation granularity for when objects were created was an entire page, 4KB, regardless of whether an object needed that much space to store its attributes. This thus wastes a considerable amount of memory and also eats up memory addresses. Timo theorizes this is part of the reason the task manager appears to be leaking entire pages of memory at a time. Win32k possesses a caching mechanism for these allocations that does not appear to be recycling freed pages so over time all of a system's memory can be exhausted.

Fortunately Timo has developed a solution for these issues. He has implemented pools of memory for each object attribute type on a per process basis. Whenever an object is created or destroyed memory is allocated or recovered from these pools. The pools are organized into sections, which range from a single page of 4KB up to 64KB. Each pool starts out with one section and more can be added as the need arises, but the amount of memory actually provided for each object creation is no larger than the actual amount needed for each attribute. A bitmap is used to indicate free slices of memory in each pool, making finding available space much faster than the previous method of asking for entire pages for every attribute of an object during its creation.

Besides the speed increase and the elimination of wasted memory, the pools also eliminate the need for the old caching mechanism. The pools themselves act as a cache of sorts, holding a reserve of memory quickly available for use during object creation. Thus Win32k does not need any additional mechanisms for holding onto old chunks of memory to reuse for new objects.

New USB Drivers

Johannes Anderwald has worked on a wide range of components in ReactOS, from the kernel to Win32k to sound and now to USB. He recently took an interest and proposed to Michael Martin that the USB drivers be rewritten in C++ instead to make them easier to maintain and review. Michael agreed, hence the flurry activity on the new EHCI driver. Their current objective is to bring it to feature parity with the old EHCI driver Michael wrote and which is now abandoned before moving onto the usbhub driver that is responsible for sending I/O request packets to the EHCI driver.

Accepted Summer of Code Projects

ReactOS received six slots for the Google Summer of Code and the selected projects were announced here. At the time I was busy with real life matters and did not have time to provide much background on any of the projects.

TCP/IP Driver

ReactOS has gone through a few iterations of the TCP/IP portion of the network stack. The latest one used an oskit library for TCP/UDP support, but integrating that library cleanly into ReactOS proved difficult. A primary consideration for any library that we use is the ability to easily update it when the other project makes new releases. If the code must be tightly integrated in order to work, the task becomes much more difficult. The lwIP library is primarily designed for embedded use, making it very lightweight and effectively standalone. This will hopefully make it much easier to integrate cleanly into the ReactOS network stack.

Explorer_New

Work on the new shell was started several years ago by Thomas Bluemel and was continued to some extent by Andrew Hill. Much of the missing functionality is due to the incomplete shell32 library, whose completion is basically a prerequisite for a correctly working explorer_new. Thus working on explorer_new also means working on shell32. A lot of groundwork is already in place for this project, but getting through the home stretch will still require quite a bit of effort.

Theme Support

Theme support has actually been one of the more often requested features for ReactOS, often by people who think having a better looking UI will attract more people. It also happens to be one of the less well documented components of Windows, which made correctly implementing it difficult. Giannis Adamopoulos has done quite a bit of research on the topic however and believes he can get a working implementation going

Audio Stream Mixing

While Johannes Anderwald has made great progress in implementing the sound stack for ReactOS, there still remains a lot of work to do in controlling multiple audio streams. The need to do this is quite common, especially if one has audio notifications enabled in the OS or applications. Right now ReactOS handles this very poorly, so having an audio mixer would make the system that much more usable

Kernelmode Testsuite

This was something that Amine Khaldi pushed for, as a test suite able to deal with kernel functionality would hopefully help make catching breakages that can break the ability of ReactOS to boot or cripple the OS faster and easier. It will also be interesting to see how this gets implemented, as a failing test is much more liable to crash the OS.

GDI Font Driver

A while ago I wrote a newsletter detailing the issues with ReactOS' font rendering. Those interested in the details can go here. To sum it up, the rendering codepath is completely wrong in ReactOS and we ignore a lot of the hinting information font glyphs provide. A proper font driver would remedy that issue and remove one more major wart in the Win32 subsystem's architecture.

Another Developer

Gabriel Ilardi gained commit access a while ago but was away from the IRC channel for several weeks so this fact slipped my mind while I prepared the previous newsletter. Either way, please welcome the semi-newest developer to join our ranks.

© ReactOS Team.