Jinoh Kang (@iamahuman) commented about dlls/win32u/winstation.c:
- static const WCHAR mapping_nameW[] =
- {
'_','_','w','i','n','e','_','m','a','p','p','i','n','g',0
- };
- OBJECT_ATTRIBUTES attr;
- UNICODE_STRING section_str;
- HANDLE handle;
- UINT status;
- void *ptr;
- RtlInitUnicodeString( §ion_str, mapping_nameW );
- InitializeObjectAttributes( &attr, §ion_str, 0, object, NULL );
- if (!(status = NtOpenSection( &handle, SECTION_MAP_READ, &attr )))
- {
ptr = NULL;
status = NtMapViewOfSection( handle, GetCurrentProcess(), &ptr, 0, 0, NULL,
`NtMapViewOfSection` uses 64k granularity. This means that no two shared mapping views can share the same 64k. Are we sure this doesn't result in excessive address fragmentation (4k alloc, 60k feee, 4k alloc, ...)