diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 4dc3e7296b6..ec4e376bd4b 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -1490,23 +1490,9 @@ static void heap_set_debug_flags( HANDLE handle ) /*********************************************************************** * RtlCreateHeap (NTDLL.@) - * - * Create a new Heap. - * - * PARAMS - * flags [I] HEAP_ flags from "winnt.h" - * addr [I] Desired base address - * totalSize [I] Total size of the heap, or 0 for a growable heap - * commitSize [I] Amount of heap space to commit - * unknown [I] Not yet understood - * definition [I] Heap definition - * - * RETURNS - * Success: A HANDLE to the newly created heap. - * Failure: a NULL HANDLE. */ HANDLE WINAPI RtlCreateHeap( ULONG flags, void *addr, SIZE_T total_size, SIZE_T commit_size, - void *unknown, RTL_HEAP_DEFINITION *definition ) + void *lock, RTL_HEAP_PARAMETERS *params ) { struct entry *entry; struct heap *heap; @@ -1514,8 +1500,8 @@ HANDLE WINAPI RtlCreateHeap( ULONG flags, void *addr, SIZE_T total_size, SIZE_T SUBHEAP *subheap; unsigned int i; - TRACE( "flags %#lx, addr %p, total_size %#Ix, commit_size %#Ix, unknown %p, definition %p\n", - flags, addr, total_size, commit_size, unknown, definition ); + TRACE( "flags %#lx, addr %p, total_size %#Ix, commit_size %#Ix, lock %p, params %p\n", + flags, addr, total_size, commit_size, lock, params ); flags &= ~(HEAP_TAIL_CHECKING_ENABLED|HEAP_FREE_CHECKING_ENABLED); if (process_heap) flags |= HEAP_PRIVATE; diff --git a/include/winternl.h b/include/winternl.h index ff8756211a1..b1687349ff6 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -2577,11 +2577,23 @@ typedef struct _PROCESS_STACK_ALLOCATION_INFORMATION_EX PROCESS_STACK_ALLOCATION_INFORMATION AllocInfo; } PROCESS_STACK_ALLOCATION_INFORMATION_EX, *PPROCESS_STACK_ALLOCATION_INFORMATION_EX; -typedef struct _RTL_HEAP_DEFINITION { - ULONG Length; /* = sizeof(RTL_HEAP_DEFINITION) */ +typedef NTSTATUS (NTAPI RTL_HEAP_COMMIT_ROUTINE)(PVOID base, PVOID *address, PSIZE_T size); +typedef RTL_HEAP_COMMIT_ROUTINE *PRTL_HEAP_COMMIT_ROUTINE; - ULONG Unknown[11]; -} RTL_HEAP_DEFINITION, *PRTL_HEAP_DEFINITION; +typedef struct _RTL_HEAP_PARAMETERS +{ + ULONG Length; + SIZE_T SegmentReserve; + SIZE_T SegmentCommit; + SIZE_T DeCommitFreeblockThreshold; + SIZE_T DeCommitTotalFreeThreshold; + SIZE_T MaximumAllocationSize; + SIZE_T VirtualMemoryThreshold; + SIZE_T InitialCommit; + SIZE_T InitialReserve; + PRTL_HEAP_COMMIT_ROUTINE CommitRoutine; + SIZE_T Reserved[2]; +} RTL_HEAP_PARAMETERS, *PRTL_HEAP_PARAMETERS; typedef struct _RTL_RWLOCK { RTL_CRITICAL_SECTION rtlCS; @@ -4665,7 +4677,7 @@ NTSYSAPI NTSTATUS WINAPI RtlCreateAcl(PACL,DWORD,DWORD); NTSYSAPI NTSTATUS WINAPI RtlCreateActivationContext(HANDLE*,const void*); NTSYSAPI NTSTATUS WINAPI RtlCreateAtomTable(ULONG,RTL_ATOM_TABLE*); NTSYSAPI NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN, PWSTR*); -NTSYSAPI HANDLE WINAPI RtlCreateHeap(ULONG,PVOID,SIZE_T,SIZE_T,PVOID,PRTL_HEAP_DEFINITION); +NTSYSAPI HANDLE WINAPI RtlCreateHeap(ULONG,PVOID,SIZE_T,SIZE_T,PVOID,PRTL_HEAP_PARAMETERS); NTSYSAPI NTSTATUS WINAPI RtlCreateProcessParameters(RTL_USER_PROCESS_PARAMETERS**,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,PWSTR,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*); NTSYSAPI NTSTATUS WINAPI RtlCreateProcessParametersEx(RTL_USER_PROCESS_PARAMETERS**,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,PWSTR,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,ULONG); NTSYSAPI PDEBUG_BUFFER WINAPI RtlCreateQueryDebugBuffer(ULONG,BOOLEAN); diff --git a/tools/winapi/win32.api b/tools/winapi/win32.api index db3c8e7941e..9e40b61654a 100644 --- a/tools/winapi/win32.api +++ b/tools/winapi/win32.api @@ -3344,7 +3344,7 @@ POBJECT_ATTRIBUTES PPRIVILEGE_SET PRTL_BITMAP PRTL_BITMAP_RUN -PRTL_HEAP_DEFINITION +PRTL_HEAP_PARAMETERS PRTL_QUERY_REGISTRY_TABLE PRTL_THREAD_START_ROUTINE PRTL_USER_PROCESS_PARAMETERS