Pointers
An array of VMKRHY structures are embedded in VMKRH at krh_akrhy.
An array of VMKRHS structures are embedded in VMKRH at krh_akrhs.
krhf_pbNext and krhb_pbPrev double link VMKRHF structures from the dummy VMKRHF embedded in VMKRK at krh_krhfDummy
VMKRH prefixes a resident heap.
Allocated blocks (VMKRHB and VMKRHBA) are sparsely allocated from the heap, with interstitial free blocks (VMKRHF).
VMKRHB prefixes the data portion of an allocated block.
VMKRHBA suffixes the data portion of an allocated block when the krhb_attr bit is set in the associated VMKRHB.
vmkrhrw (0xffec)
kdbsym (0xff7c)
krhrw1m (0xff43)
krhro1m (0xff44)
VMKRH Kernel Resident Heap Header.
┌────────────────┬──────┬──────┬────┬────────────────────────────────────────┐│Field Name │Offset│Length│Type│Description │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krh_cBlocks │+0 │4 │D │Count of heap blocks │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krh_cFreeBlocks │+4 │4 │D │Count of free heap blocks │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krh_pbFirst │+8 │4 │D │First Heap Block │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krh_pbLast │+C │4 │D │Last Heap Block │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krh_pbEndRes │+10 │4 │D │Upper bound of reserved virt mem │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krh_pbEndCom │+14 │4 │D │Upper bound of committed virt mem │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krh_lpgBase │+18 │4 │D │Start lin page of heap object │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krh_cMods │+1C │4 │D │Count of heap modifications │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krh_fl │+20 │4 │D │Resident heap flags │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krh_krhfDummy │+24 │C │D │Dummy free block │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krh_pkrhsLast │+30 │4 │D │Last Freelist Section Pointer │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krh_akrhy │+34 │30 │S │Array of 8 yield structures │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krh_akrhs │+64 │50 │S │Array of 5 free list sections │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krh_hob │+B4 │2 │W │Heap object handle │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krh_ksem │+B6 │C(10) │S │KSEM for resident heap │ └────────────────┴──────┴──────┴────┴────────────────────────────────────────┘
VMKRHY Kernel Resident Heap Yield List Structure.
┌────────────────┬──────┬──────┬────┬────────────────────────────────────────┐ │Field Name │Offset│Length│Type│Description │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krhy_pb │+0 │4 │D │Block pointer │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krhy_cyield │+4 │2 │W │Yield count │ └────────────────┴──────┴──────┴────┴────────────────────────────────────────┘
VMKRHS Kernel Resident Heap Free List Anchor Structure.
┌────────────────┬──────┬──────┬────┬────────────────────────────────────────┐ │Field Name │Offset│Length│Type│Description │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krhs_cbMax │+0 │4 │D │Maximum block size │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krhs_krhfHead │+4 │C │S │Dummy free block used to locate head of │ │ │ │ │ │list │ └────────────────┴──────┴──────┴────┴────────────────────────────────────────┘
VMKRHF Kernel Resident Heap Free Block.
┌────────────────┬──────┬──────┬────┬────────────────────────────────────────┐ │Field Name │Offset│Length│Type│Description │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krhf_struct0 │+0 │4 │S │Resident Heap Block Header │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krhf_pbNext │+4 │4 │D │Forward freelist link │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krhf_pbPrev │+8 │4 │D │Backward freelist link │ └────────────────┴──────┴──────┴────┴────────────────────────────────────────┘
VMKRHB Kernel Resident Heap Block Header.
┌────────────────┬──────┬──────┬────┬────────────────────────────────────────┐ │Field Name │Offset│Length│Type│Description │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ │+0 │4 │S │Regular Block Header │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krhb_hobowner │+0 │2 │D │Owner │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krhb_pfree │ │0.1 │ │Preceding block is free │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krhb_usSize │ │1.5 │ │Size of block in dwords │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krhb_yield │ │0.1 │ │Thread-yielded-here flag │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krhb_attr │ │0.1 │ │Attributed block flag (=0) │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ │+0 │4 │S │Attributed Block Header │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ │+0 │0.1 │D │Attributed block is free │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │ │ │0.1 │ │Block preceding attributed block is free│ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krhb_ulSize │ │3.4 │ │Size of block in dwords │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krhb_yield │ │0.1 │ │Thread-yielded-here flag │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │krhb_attr │ │0.1 │ │Attributed block flag (=1) │ └────────────────┴──────┴──────┴────┴────────────────────────────────────────┘
VMKRHBA Kernel Resident Heap Block Header Attributes.
┌────────────────┬──────┬──────┬────┬────────────────────────────────────────┐ │Field Name │Offset│Length│Type│Description │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │khba_sel │+0 │2 │W │Selector mapping heap block data │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │khba_hobOwner │+2 │2 │W │Heap block owner │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │khba_hobMTE │+4 │2 │W │Heap block MTE │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │khba_pad │+6 │2 │W │Pad to DWORD mutiple. │ └────────────────┴──────┴──────┴────┴────────────────────────────────────────┘
krh_fl flag definitions.
┌──────────────┬──────────┬─────────────────────────────────┐ │Name │Bit Mask │Description │ ├──────────────┼──────────┼─────────────────────────────────┤ │PG_CONTIG │0x00000001│contiguous physical memory │ ├──────────────┼──────────┼─────────────────────────────────┤ │PG_NOINCR │0x00000001│don't increment physical addrs │ ├──────────────┼──────────┼─────────────────────────────────┤ │PG_W │0x00000002│Writable - value from pte │ ├──────────────┼──────────┼─────────────────────────────────┤ │PG_U │0x00000004│user mode accessible - from pte │ ├──────────────┼──────────┼─────────────────────────────────┤ │PG_X │0x00000008│eXecutable │ ├──────────────┼──────────┼─────────────────────────────────┤ │PG_R │0x00000010│Readable │ ├──────────────┼──────────┼─────────────────────────────────┤ │PG_1M │0x00000020│must reside below 1 meg physical │ ├──────────────┼──────────┼─────────────────────────────────┤ │PG_GUARD │0x00000040│guard page - from pte │ ├──────────────┼──────────┼─────────────────────────────────┤ │PG_16M │0x00000040│must reside below 16 meg physical│ ├──────────────┼──────────┼─────────────────────────────────┤ │PG_ZEROFILL │0x00000080│zero initialize pages │ ├──────────────┼──────────┼─────────────────────────────────┤ │PG_SWAPONWRITE│0x00000100│value from vp │ ├──────────────┼──────────┼─────────────────────────────────┤ │PG_UVIRT │0x00000200│value from pte │ ├──────────────┼──────────┼─────────────────────────────────┤ │PG_RESIDENT │0x00000400│value from pte │ ├──────────────┼──────────┼─────────────────────────────────┤ │PG_DISCARDABLE│0x00000800│value from vp │ └──────────────┴──────────┴─────────────────────────────────┘