[2/3] ntdll: fill unused tails of heap blocks if HEAP_FREE_CHECKING_ENABLED (take 3)
Alexandre Julliard
julliard at winehq.org
Fri Jan 8 03:10:53 CST 2010
Dan Kegel <dank at kegel.com> writes:
> @@ -1254,14 +1291,20 @@ HANDLE WINAPI RtlCreateHeap( ULONG flags, PVOID addr, SIZE_T totalSize, SIZE_T c
> {
> SUBHEAP *subheap;
>
> - /* Allocate the heap block */
> + /* Check global flags unless we're being called in virtual_init before they
> + * are available. Recognize that by comparing the arguments we know
> + * wine's virtual_init calls us with.
> + */
> + if (flags != HEAP_NO_SERIALIZE && totalSize != VIRTUAL_HEAP_SIZE)
> + if ((RtlGetNtGlobalFlags() & FLG_HEAP_ENABLE_FREE_CHECK) != 0)
> + flags |= HEAP_FREE_CHECKING_ENABLED;
This makes no sense, there's nothing unique about these arguments.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list