This file defines constants, structures, and macros for heap memory management functions of PwnOS.
| HeapMemory.inc | This file defines constants, structures, and macros for heap memory management functions of PwnOS. |
| HEAP_MEMORY_HEADER | This structure defines the heap memory header. |
| HEAP_MEMORY_NODE | This structure defines a heap memory range node. |
| Enumerations | |
| Heap Memory Node Flags | These are constants for the Flags member of HEAP_MEMORY_NODE. |
This structure defines the heap memory header.
| AccessLock | LOCKSTRUCT to lock access to the heap so that only one thread can allocate at a time |
| Address | Start address of heap memory |
| nBytes | Total # of bytes of heap memory, including tree nodes |
| pFreeRoot | Address of Free Tree root node (HEAP_MEMORY_NODE) |
| pAddrRoot | Address of Address Tree root node (HEAP_MEMORY_NODE) |
| pNewNode | Address at which to add new nodes |
| Padding | (padding to 16-byte alignment) |
This structure defines a heap memory range node.
| Address | Address of heap memory range; Always dword-aligned |
| nBytes | Total # of bytes of heap memory range; Always multiple of 4 |
| Flags | HEAP_MEMORY_FLAG_ALLOCATION set if range is an allocation (clear if range is a free range) |
| Padding | (padding to 16-byte alignment) |
| pFreeParent | Address of parent node in Free Tree |
| pFreeLeft | Address of left child node in Free Tree |
| pFreeRight | Address of right child node in Free Tree |
| FreeHeight | Height of this node’s subtree in Free Tree |
| pAddrParent | Address of parent node in Address Tree |
| pAddrLeft | Address of left child node in Address Tree |
| pAddrRight | Address of right child node in Address Tree |
| AddrHeight | Height of this node’s subtree in Address Tree |
| Enumerations | |
| Heap Memory Node Flags | These are constants for the Flags member of HEAP_MEMORY_NODE. |
These are constants for the Flags member of HEAP_MEMORY_NODE.
1 Increment: shl
| HEAP_MEMORY_FLAG_ALLOCATION | indicates that the memory range is allocated if set (and free range if clear) |