[RFC PATCH 08/11] HACK: ntdll: Conditionally enable LFH.
Rémi Bernon
rbernon at codeweavers.com
Wed May 6 07:10:00 CDT 2020
---
dlls/ntdll/heap.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c
index 6b5fc45d381e..f3c378a927d2 100644
--- a/dlls/ntdll/heap.c
+++ b/dlls/ntdll/heap.c
@@ -2339,8 +2339,12 @@ NTSTATUS WINAPI RtlQueryHeapInformation( HANDLE heap, HEAP_INFORMATION_CLASS inf
*/
NTSTATUS WINAPI RtlSetHeapInformation( HANDLE heap, HEAP_INFORMATION_CLASS info_class, PVOID info, SIZE_T size)
{
+ static int enable_winelfh = -1;
HEAP *heapPtr;
+ if (enable_winelfh == -1 && (enable_winelfh = getenv("WINELFH") && atoi(getenv("WINELFH"))))
+ MESSAGE("wine: enabling low fragmentation heaps\n");
+
TRACE("%p %d %p %ld stub\n", heap, info_class, info, size);
if (!(heapPtr = HEAP_GetPtr( heap )))
@@ -2362,6 +2366,9 @@ NTSTATUS WINAPI RtlSetHeapInformation( HANDLE heap, HEAP_INFORMATION_CLASS info_
return STATUS_SUCCESS;
}
+ if (!enable_winelfh)
+ return STATUS_SUCCESS;
+
heapPtr->extended_type = *(ULONG *)info;
return STATUS_SUCCESS;
--
2.26.1
More information about the wine-devel
mailing list