[PATCH v11 1/2] ntdll: Clarify NtAllocateVirtualMemory zero_bits parameter semantics

Rémi Bernon rbernon at codeweavers.com
Wed Jun 12 06:05:44 CDT 2019


On Wed, 2019-06-12 at 11:59 +0100, Huw Davies wrote:
> On Wed, Jun 12, 2019 at 10:59:44AM +0200, Rémi Bernon wrote:
> > +/*****************************************************************
> > ******
> > + *             virtual_alloc_aligned   (NTDLL.@)
> > + *
> > + * Same as NtAllocateVirtualMemory but with an alignment parameter
> > + */
> > +NTSTATUS virtual_alloc_aligned( PVOID *ret, ULONG zero_bits,
> > SIZE_T *size_ptr,
> > +                                ULONG type, ULONG protect, ULONG
> > alignment )
> > +{
> > +    void *base;
> > +    unsigned int vprot;
> > +    SIZE_T size = *size_ptr;
> > +    SIZE_T mask = get_mask( alignment );
> > +    NTSTATUS status = STATUS_SUCCESS;
> > +    BOOL is_dos_memory = FALSE;
> > +    struct file_view *view;
> > +    sigset_t sigset;
> > +
> > +    if (zero_bits)
> > +    {
> > +        FIXME("Unimplemented zero_bits parameter value\n");
> > +    }
> > +
> 
> Actually let's put this in map_view() since that is supposed to
> handle
> this.  Obviously this patch needs to be extended to also include
> passing zero_bits to that function.
> 
> Huw.

As we are at it, I was thinking of extending the patch to add the same
FIXME for NtMapViewOfSection as well.

For it to be on the same level as NtAllocateVirtualMemory, it would
require to change the way zero_bits is interpreted as well, but this
would make some tests fail, and so we're again in the same situation
were the tests should go to ntdll tests.

I can do that later in another patch set maybe.

What do you think?
-- 
Rémi Bernon <rbernon at codeweavers.com>




More information about the wine-devel mailing list