ntdll: Heap handles should be 64K-aligned.

This commit is contained in:
Alexandre Julliard 2014-03-26 11:24:14 +01:00
parent 8a82aacec9
commit 395df1aa2d
2 changed files with 2 additions and 1 deletions

View File

@ -69,6 +69,7 @@ static void test_Heap(void)
*/
memchunk=10*sysInfo.dwPageSize;
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 */
mem1=HeapAlloc(heap,0,5*memchunk+1);

View File

@ -879,7 +879,7 @@ static SUBHEAP *HEAP_CreateSubHeap( HEAP *heap, LPVOID address, DWORD flags,
commitSize = min( totalSize, (commitSize + COMMIT_MASK) & ~COMMIT_MASK );
/* allocate the memory block */
if (NtAllocateVirtualMemory( NtCurrentProcess(), &address, 5, &totalSize,
if (NtAllocateVirtualMemory( NtCurrentProcess(), &address, 0, &totalSize,
MEM_RESERVE, get_protection_type( flags ) ))
{
WARN("Could not allocate %08lx bytes\n", totalSize );