|
| | heap (const node &n) |
| | Open a heap object on a node.
|
| |
| | heap (const node &n, alias_tag) |
| | Open a heap object on a node alias.
|
| |
| | heap (const node &n, byte client_sig) |
| | Open a heap object on the specified node, and validate the client sig.
|
| |
| | heap (const node &n, byte client_sig, alias_tag) |
| | Open a heap object on the specified node (alias), and validate the client sig.
|
| |
| | heap (const heap &other) |
| | Copy constructor.
|
| |
| | heap (const heap &other, alias_tag) |
| | Alias constructor.
|
| |
| | heap (heap &&other) |
| | Move constructor.
|
| |
| size_t | size (heap_id id) const |
| | Get the size of the given allocation.
|
| |
| heap_id | get_root_id () const |
| | Returns the client root allocation out of this heap.
|
| |
| byte | get_client_signature () const |
| | Returns the client signature of the heap.
|
| |
| size_t | read (std::vector< byte > &buffer, heap_id id, ulong offset) const |
| | Read data out of a specified allocation at the specified offset.
|
| |
| std::vector< byte > | read (heap_id id) const |
| | Read an entire allocation.
|
| |
| hid_stream_device | open_stream (heap_id id) |
| | Creates a stream device over a specified heap allocation.
|
| |
| const node & | get_node () const |
| | Get the node underlying this heap.
|
| |
| node & | get_node () |
| | Get the node underlying this heap.
|
| |
| template<typename K , typename V > |
| std::shared_ptr< bth_node< K, V > > | open_bth (heap_id root) |
| | Opens a BTH from this heap with the given root id.
|
| |
Heap-on-Node implementation.
The HN is the first concept built on top of the node abstraction exposed by the NDB. It treats the node similar to how a memory heap is treated, allowing the client to allocate memory up to 3.8k and free those allocations from inside the node. To faciliate this, metadata is kept at the start and end of each block in the HN node (which are confusingly sometimes called pages in this context). So the HN has detailed knowledge of how blocks and extended_blocks work in order to do it's book keeping, and find the appropriate block (..page) to satisfy a given allocation request.
Note a heap completely controls a node - you can not have multiple heaps per node. You can not use a node which has a heap on it for any other purpose beyond the heap interface.
- See also
- [MS-PST 2.3.1]
Definition at line 194 of file heap.h.
| heap_id pstsdk::heap::get_root_id |
( |
| ) |
const |
|
inline |
Returns the client root allocation out of this heap.
This value has specific meaning to the owner of the heap. It may point to a special structure which contains information about the data structures implemented in this heap or the larger node and subnodes (such as the table). Or, it could just point to the root BTH allocation (such as the property_bag). In any event, the heap itself gives no special meaning to this value.
- Returns
- The client's root allocation
Definition at line 237 of file heap.h.