mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-31 04:13:37 +00:00
[WIN32K]
<bug> - The timer implementation uses a bitmap to store window-less timers. As an optimization to find the first free index, it uses the variable "HintIndex" which points to the first timer index. In order to find the next free index, the RtlFindClearBitsAndSet function is used. When a new timer is allocated, the "HintIndex" variable is increased, which increases the search offset. Now if more than NUM_WINDOW_LESS_TIMERS (1024) timers are allocated, no more timers can be allocated because RtlFindClearBitsAndSet will claim no more index are available, because the free indexes are below the search offset. </bug> <fix> Everytime a timer gets freed, store the freed index in "HintIndex". As a result the timer implementation will always find a free timer index (when there is one) </fix> svn path=/trunk/; revision=47069
This commit is contained in:
@@ -526,6 +526,8 @@ IntKillTimer(HWND Wnd, UINT_PTR IDEvent, BOOL SystemTimer)
|
||||
ASSERT(RtlAreBitsSet(&WindowLessTimersBitMap, IDEvent - 1, 1));
|
||||
RtlClearBits(&WindowLessTimersBitMap, IDEvent - 1, 1);
|
||||
|
||||
HintIndex = IDEvent - 1;
|
||||
|
||||
IntUnlockWindowlessTimerBitmap();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user