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?)