Alexandre Julliard : ntdll: Round up the initial commit size to the commit granularity.

Alexandre Julliard julliard at winehq.org
Tue Jun 29 10:25:19 CDT 2010


Module: wine
Branch: master
Commit: 6a9f170b1cd439451e42184a955970a3aaaf71d3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6a9f170b1cd439451e42184a955970a3aaaf71d3

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jun 29 10:55:20 2010 +0200

ntdll: Round up the initial commit size to the commit granularity.

---

 dlls/ntdll/heap.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c
index 15dd85c..df94410 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,




More information about the wine-cvs mailing list