Pointers

      _apkh points to the head of the VMKH array.

      SAS_vm_heap_info also points to this array.

    Locations
      System Arena.
    VM Owner
      os2krnl (0xffaa)

    Format

    VMKH Kernel Heap Header.

    ┌────────────────┬──────┬──────┬────┬────────────────────────────────────────┐│Field Name      │Offset│Length│Type│Description                             │
    ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │kh_fl           │+0    │4     │D   │Allocation flags                        │
    ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │kh_pkrh         │+4    │4     │D   │Pointer to resident heap header         │
    ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │kh_pksh         │+4    │4     │D   │Pointer to swappable heap header        │
    └────────────────┴──────┴──────┴────┴────────────────────────────────────────┘
    

    kh_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                    │
    └──────────────┴──────────┴─────────────────────────────────┘
    

    Heap Handles (hkh)

    Kernel heap handles used to index the array of VMKH structures.

    ┌──────────────────┬──────────┬───────────────────────────────┐
    │Name              │hkh value │Description                    │
    ├──────────────────┼──────────┼───────────────────────────────┤
    │VM_HKH_PUB_RESRW  │1         │Kernel resident RW heap handle │
    ├──────────────────┼──────────┼───────────────────────────────┤
    │VM_HKH_PUB_RESRO  │2         │Public resident RO heap handle │
    ├──────────────────┼──────────┼───────────────────────────────┤
    │VM_HKH_PUB_SWAPRW │3         │Public swappable RW heap handle│
    ├──────────────────┼──────────┼───────────────────────────────┤
    │VM_HKH_PUB_SWAPRO │4         │Public swappable RO heap handle│
    ├──────────────────┼──────────┼───────────────────────────────┤
    │VM_HKH_PUB_RES1MRW│5         │Public resident RW 1M handle   │
    ├──────────────────┼──────────┼───────────────────────────────┤
    │VM_HKH_PUB_RES1MRO│6         │Public resident RO 1M handle   │
    └──────────────────┴──────────┴───────────────────────────────┘
    

    Note:

    It is possible for more than one handle to be served by the same heap. In particular, under the RETAIL kernel all heap handle are mapped to either a read/write resident or swappable heap.


    [Back] [Next]