[PATCH 5/5] ntdll: Implement RtlSetUserValueHeap.

Zebediah Figura zfigura at codeweavers.com
Tue Jun 7 14:33:15 CDT 2022


On 6/7/22 13:33, Rémi Bernon wrote:
>   typedef struct
>   {
> +    SIZE_T __pad[sizeof(SIZE_T) / sizeof(DWORD)];
>       struct list           entry;      /* entry in heap large blocks list */
>       SIZE_T                data_size;  /* size of user data */
>       SIZE_T                block_size; /* total size of virtual memory block */
> -    DWORD                 pad[2];     /* padding to ensure 16-byte alignment of data */
> +    void                 *user_value;
>       DWORD                 size;       /* fields for compatibility with normal arenas */
>       DWORD                 magic;      /* these must remain at the end of the structure */
>   } ARENA_LARGE;

Doesn't this end up wasting space on 64 bits? I.e. the structure is 
already aligned to a multiple of 16 bytes without any padding.

(Also, somewhat out of curiosity, why move the member?)



More information about the wine-devel mailing list