Size Of Heap by Default is 1MB Reserve and 1KB commit
these can be changed by using linker option /HEAP:<reserve>,commit
During Initialization of Process system/loader/os Creates a Process Heap for Each Process
Changing the SizeOfHeapCommit and Reserve Changes the Size of this ProcessHeap
the Address Heap Thus Allocated During Process Creation is Available to the Process in
Process Environment Block or peb
0:000> dt ntdll!_PEB @$peb -y ProcessH
+0x018 ProcessHeap : 0x004e0000 Void
+0x090 ProcessHeaps : 0x76fb7500 -> 0x004e0000 Void
0:000> !heap -stat 4e0000
_HEAP 004e0000
Segments 00000001
Reserved bytes 00a00000 <<<<<<
Committed bytes 00a00000 <<<<<<
exe was compiled with /link /HEAP:10485760,10485760
VirtAllocBlocks 00000000
VirtAlloc bytes 00000000
_HEAP 00020000
Segments 00000001
Reserved bytes 00010000
Committed bytes 00001000
VirtAllocBlocks 00000000
VirtAlloc bytes 00000000
0:000> .shell -ci "!dh ten" grep -i "size of heap"
00a00000 size of heap reserve
00a00000 size of heap commit
.shell: Process exited
0:000>