#ifndef _NTRTL_H
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;
View code on GitHub// ntifs.h
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;
View the official Windows Driver Kit DDI referenceThis structure is documented in Windows Driver Kit.
The RTL_HEAP_PARAMETERS structure contains parameters to be applied when creating a heap.
LengthSize, in bytes, of the RTL_HEAP_PARAMETERS structure.
SegmentReserveSegment reserve size, in bytes. If this value is not specified, 1 MB is used.
SegmentCommitSegment commit size, in bytes. If this value is not specified, PAGE_SIZE * 2 is used.
DeCommitFreeBlockThresholdDecommit free block threshold, in bytes. If this value is not specified, PAGE_SIZE is used.
DeCommitTotalFreeThresholdDecommit total free threshold, in bytes. If this value is not specified, 65536 is used.
MaximumAllocationSizeSize, in bytes, of the largest block of memory that can be allocated from the heap. If this value is not specified, the difference between the highest and lowest addresses, less one page, is used.
VirtualMemoryThresholdVirtual memory threshold, in bytes. If this value is not specified, or if it is greater than the maximum heap block size, the maximum heap block size of 0x7F000 is used.
InitialCommitInitial amount of memory, in bytes, to commit for the heap. Must be less than or equal to InitialReserve. If HeapBase and CommitRoutine are non-NULL, this parameter, which overrides the value of CommitSize, must be a nonzero value; otherwise it is ignored.
InitialReserveInitial amount of memory, in bytes, to reserve for the heap. If HeapBase and CommitRoutine are non-NULL, this parameter, which overrides the value of ReserveSize, must be a nonzero value; otherwise it is ignored.
CommitRoutinePointer to a RTL_HEAP_COMMIT_ROUTINE routine to commit pages from the heap. If this parameter is non-NULL, the heap must be nongrowable. If HeapBase is NULL, CommitRoutine must also be NULL.
ReservedReserved for system use. Drivers must set this parameter to zero.
RTL_HEAP_COMMIT_ROUTINE RtlCreateHeap