[PATCH v4 1/5] Don't use ZeroBits argument of NtAllocateVirtualMemory in COMMDLG file dialogs

Alexandre Julliard julliard at winehq.org
Tue Mar 19 13:33:42 CDT 2019


Las at protonmail.ch writes:

> I've fixed the tests and attached my real name now.
>
> From 248da5328eb781f33e9a7f5de4bbd1edadc1b4cc Mon Sep 17 00:00:00 2001
> From: Lass Safin <las at protonmail.ch>
> Date: Mon, 4 Mar 2019 20:27:51 +0100
> Subject: [PATCH v4 1/5] Don't use ZeroBits argument of NtAllocateVirtualMemory
>  in COMMDLG file dialogs
>
> The argument was mistakenly assumed to be the alignment of
> the allocated address, when it is in fact the number of upper bits
> that should be zero, effectively declaring the pointer size (0 being native,
> 1 being 31 bits, 2 being 30, etc.).
>
> It is not clear why an alignment of 2^12 was needed in the first place,
> so the alignment requirement is completely removed.

The goal was to avoid wasting 64K of virtual memory just for a single
page. If that's not feasible, you may as well make it use VirtualAlloc()
instead.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list