Post · 1 min read· pp. 1644–1645

MMWSL_SHARED

The MMWSL_INSTANCE is the second part of an MMWSL_FULL, which is in turn the continuation of the ancient MMWSL structure after its separation into parts for the 1607 release of Windows 10.

Variability

As an internal structure with little, if any, visibility outside the kernel, the MMWSL_SHARED varies greatly between versions and even between builds.

VersionSize (x86)Size (x64)
16070x400x60

Layout

These sizes, and the names, offsets and types in the tables that follow, are from Microsoft’s symbol files for the kernel.

Offset (x86)Offset (x64)DefinitionVersionsRemarks
0x000x00ULONG_PTR FirstFree;1607 and higherpreviously at 0x00 in MMWSL
0x040x08ULONG_PTR FirstDynamic;1607 and higherpreviously at 0x04 and 0x08 in MMWSL
0x080x10ULONG_PTR LastEntry;1607 and higherpreviously at 0x08 and 0x10 in MMWSL
0x0C0x18ULONG_PTR LastInitializedWsle;1607 and higherpreviously at 0x10 and 0x20 in MMWSL
0x100x20ULONG WsleSize;1607 and higherpreviously at 0x24 and 0x40 in MMWSL
0x140x28ULONG_PTR NonDirectCount;1607 and higherpreviously at 0x28 and 0x48 in MMWSL
0x180x30PVOID LowestPagableAddress;1607 and higherpreviously at 0x2C and 0x50 in MMWSL
0x1C0x38MMWSLE_NONDIRECT_HASH *NonDirectHash;1607 and higherpreviously at 0x30 and 0x58 in MMWSL
0x200x40MMWSLE_HASH *HashTableStart;1607 and higherpreviously at 0x34 and 0x60 in MMWSL
0x240x48MMWSLE_HASH *HighestPermittedHashAddress;1607 and higherpreviously at 0x38 and 0x68 in MMWSL
0x300x50MMWSLE *Wsle;1607 and higherpreviously at 0xFC and 0x01F0 in MMWSL

If the type information from symbol files is to be believed (as complete), then Wsle must have 16-byte alignment for 32-bit Windows and the whole structure must for 64-bit Windows (perhaps from Wsle having 16-byte alignment in 64-bit Windows too).