mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 19:26:16 +00:00
- RtlpInsertFreeBlockHelper: Don't validate the Previous Size of the next Heap Entry when inserting a free Heap Entry into a free list. Should solve bug #5843 and may affect bug #5857. All callers of this function already perform this check, except for RtlpInsertFreeBlock, a function used during Heap Segment creation/expansion. RtlpInsertFreeBlock creates multiple free Heap Entries (using the helper function) if the free space is too big to be contained in a single Heap Entry. In such a case however, it creates a Heap Entry and calls the helper before creating the next Heap Entry, which triggers this assert. svn path=/trunk/; revision=50617
RTL restrictions: ExAllocatePool (and friends) must be used exclusively. RtlAllocateHeap (and friends) must NOT be used! ExAllocatePool (and friends) translate to RtlAllocateHeap (and friends) in ntdll\rtl\libsupp.c. RtlEnterCriticalSection (and friends) must be used exclusively. ExAcquireFastMutex (and friends) must NOT be used! RtlEnterCriticalSection (and friends) translate to ExAcquireFastMutex (and friends) in ntoskrnl\rtl\libsupp.c. This means that RtlEnterCriticalSection (and friends) can NOT be used recursively in RTL. The reason for choosing RtlEnterCriticalSection (and friends) over ExAcquireFastMutex (and friends) is that the FAST_MUTEX struct is smaller than the RTL_CRITICAL_SECTION struct.