From 6a9f170b1cd439451e42184a955970a3aaaf71d3 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 29 Jun 2010 10:55:20 +0200 Subject: [PATCH] ntdll: Round up the initial commit size to the commit granularity. --- dlls/ntdll/heap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 15dd85ccd4d..df944100f56 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -862,6 +862,7 @@ static SUBHEAP *HEAP_CreateSubHeap( HEAP *heap, LPVOID address, DWORD flags, totalSize = min( totalSize, 0xffff0000 ); /* don't allow a heap larger than 4Gb */ if (totalSize < commitSize) totalSize = commitSize; if (flags & HEAP_SHARED) commitSize = totalSize; /* always commit everything in a shared heap */ + commitSize = min( totalSize, (commitSize + COMMIT_MASK) & ~COMMIT_MASK ); /* allocate the memory block */ if (NtAllocateVirtualMemory( NtCurrentProcess(), &address, 5, &totalSize, -- 2.11.4.GIT