[RTL]: Correctly read PEB or Kernel Variables for Heap Tuning.
[reactos.git] / reactos / ntoskrnl / rtl / libsupp.c
index 1afd455..36fcbdb 100644 (file)
@@ -235,6 +235,17 @@ CHECK_PAGED_CODE_RTL(char *file, int line)
 }
 #endif
 
+VOID
+NTAPI
+RtlpSetHeapParameters(IN PRTL_HEAP_PARAMETERS Parameters)
+{
+    /* Apply defaults for non-set parameters */
+    if (!Parameters->SegmentCommit) Parameters->SegmentCommit = MmHeapSegmentCommit;
+    if (!Parameters->SegmentReserve) Parameters->SegmentReserve = MmHeapSegmentReserve;
+    if (!Parameters->DeCommitFreeBlockThreshold) Parameters->DeCommitFreeBlockThreshold = MmHeapDeCommitFreeBlockThreshold;
+    if (!Parameters->DeCommitTotalFreeThreshold) Parameters->DeCommitTotalFreeThreshold = MmHeapDeCommitTotalFreeThreshold;
+}
+
 VOID
 NTAPI
 RtlpCheckLogException(IN PEXCEPTION_RECORD ExceptionRecord,