Commit 78ffde79 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Report the remaining part of the 64K after a view as free.

To avoid returning non-aligned reserved regions.
parent 8b992fec
......@@ -4638,6 +4638,18 @@ static unsigned int fill_basic_memory_info( const void *addr, MEMORY_BASIC_INFOR
if (area_end < alloc_end) info->RegionSize = area_end - base;
break;
}
/* report the remaining part of the 64K after the view as free */
if ((UINT_PTR)alloc_base & granularity_mask)
{
char *next = (char *)ROUND_ADDR( alloc_base, granularity_mask ) + granularity_mask + 1;
if (base < next)
{
info->RegionSize = min( next, alloc_end ) - base;
break;
}
else alloc_base = base;
}
/* pretend it's allocated */
if (area_start < alloc_end) info->RegionSize = area_start - base;
info->State = MEM_RESERVE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment