[PATCH] eal/windows: fix memory management macros usage

Tyler Retzlaff roretzla at linux.microsoft.com
Tue Nov 14 19:22:12 CET 2023


On Tue, Nov 14, 2023 at 08:16:22PM +0200, Etelson, Gregory wrote:
> Hello Tyler,
> 
> >
> >since we are duplicating something that comes from something else that
> >has been duplicated out of windows WDK here it might be a reasonable
> >safety check to verify that our duplicated values match our
> >expectations?
> 
> MEM_COALESCE_PLACEHOLDERS, MEM_PRESERVE_PLACEHOLDER,
> MEM_REPLACE_PLACEHOLDER and MEM_RESERVE_PLACEHOLDER
> are defined in Win32 API.
> 
> DPDK has no expectations about these values. DPDK needs them as
> parameters to the VirtualX function calls.
> It looks like the macros were added to EAL because they were missing
> in mingw.
> 
> Once compiler environment was fixed, the proper order was restored.

yes, there is a lag between when names appear in the actual WDK and when
mingw takes a the snapshot of the headers. so long as the copy they take
is only from released WDK versions that align with an OS we shouldn't
expect the values to change but if the duplicated names in dpdk were
based upon an insider (preview version of SDK) value that later got changed
there could be a misalignment. unlikely but possible.

> 
> Regards,
> Gregory
> 
> 
> >
> >#ifndef MEM_COALESCE_PLACEHOLDERS
> >#define MEM_COALESCE_PLACEHOLDERS 0x00000001
> >#else
> >static_assert(MEM_COALESCE_PLACEHOLDERS == 0x00000001, "...")
> >#endif
> >
> >either way, this is straight forward.
> >
> >Acked-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
> >
> >


More information about the stable mailing list