Commit 395df1aa authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Heap handles should be 64K-aligned.

parent 8a82aace
...@@ -69,6 +69,7 @@ static void test_Heap(void) ...@@ -69,6 +69,7 @@ static void test_Heap(void)
*/ */
memchunk=10*sysInfo.dwPageSize; memchunk=10*sysInfo.dwPageSize;
heap=HeapCreate(0,2*memchunk,5*memchunk); heap=HeapCreate(0,2*memchunk,5*memchunk);
ok( !((ULONG_PTR)heap & 0xffff), "heap %p not 64K aligned\n", heap );
/* Check that HeapCreate allocated the right amount of ram */ /* Check that HeapCreate allocated the right amount of ram */
mem1=HeapAlloc(heap,0,5*memchunk+1); mem1=HeapAlloc(heap,0,5*memchunk+1);
......
...@@ -879,7 +879,7 @@ static SUBHEAP *HEAP_CreateSubHeap( HEAP *heap, LPVOID address, DWORD flags, ...@@ -879,7 +879,7 @@ static SUBHEAP *HEAP_CreateSubHeap( HEAP *heap, LPVOID address, DWORD flags,
commitSize = min( totalSize, (commitSize + COMMIT_MASK) & ~COMMIT_MASK ); commitSize = min( totalSize, (commitSize + COMMIT_MASK) & ~COMMIT_MASK );
/* allocate the memory block */ /* allocate the memory block */
if (NtAllocateVirtualMemory( NtCurrentProcess(), &address, 5, &totalSize, if (NtAllocateVirtualMemory( NtCurrentProcess(), &address, 0, &totalSize,
MEM_RESERVE, get_protection_type( flags ) )) MEM_RESERVE, get_protection_type( flags ) ))
{ {
WARN("Could not allocate %08lx bytes\n", totalSize ); WARN("Could not allocate %08lx bytes\n", totalSize );
......
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