![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "steam/engine/buffer-metadata.hpp"
(Hash)Table to store and manage buffer metadata.
Buffer metadata entries are comprised of a Key part and an extended Entry, holding the actual management and housekeeping metadata. The Keys are organised hierarchically and denote the "kind" of buffer. The hash values for lookup are based on the key part, chained with the actual memory location of the concrete buffer corresponding to the metadata entry to be retrieved.
Definition at line 438 of file buffer-metadata.hpp.
Public Member Functions | |
| ~Table () | |
| Entry * | fetch (HashVal hashID) |
| fetch metadata record, if any | |
| const Entry * | fetch (HashVal hashID) const |
| Entry & | store (Entry const &newEntry) |
| store a copy of the given new metadata entry. | |
| void | remove (HashVal hashID) |
Private Types | |
| using | MetadataStore = std::unordered_map< HashVal, Entry > |
Private Member Functions | |
| void | verify_all_buffers_freed () |
Static Private Member Functions | |
| static void | verify_is_free (std::pair< HashVal, Entry > const &e) |
Private Attributes | |
| MetadataStore | entries_ |
|
inline |
Definition at line 445 of file buffer-metadata.hpp.
References Table::verify_all_buffers_freed().
Here is the call graph for this function:
|
private |
Definition at line 440 of file buffer-metadata.hpp.
|
inline |
fetch metadata record, if any
| hashID | for the Key part of the metadata entry |
Definition at line 452 of file buffer-metadata.hpp.
References Table::entries_, and NULL.
Referenced by BufferMetadata::get(), BufferMetadata::isKnown(), BufferMetadata::isLocked(), BufferMetadata::key(), BufferMetadata::lock(), BufferMetadata::release(), and Table::store().
Here is the caller graph for this function:
|
inline |
Definition at line 462 of file buffer-metadata.hpp.
References Table::entries_, and NULL.
store a copy of the given new metadata entry.
The hash key for lookup is retrieved from the given Entry, by conversion to HashVal. Consequently, this will be the hashID of the parent Key (type), when the entry holds a NULL buffer (i.e a "pseudo entry"). Otherwise, it will be this parent Key hash, extended by hashing the actual buffer address.
Definition at line 480 of file buffer-metadata.hpp.
References Table::entries_, and Table::fetch().
Referenced by BufferMetadata::maybeStore(), and BufferMetadata::store_as_locked().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 491 of file buffer-metadata.hpp.
References Table::entries_.
Referenced by BufferMetadata::release().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 499 of file buffer-metadata.hpp.
References Table::entries_, and Table::verify_is_free().
Referenced by Table::~Table().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestaticprivate |
Definition at line 507 of file buffer-metadata.hpp.
Referenced by Table::verify_all_buffers_freed().
Here is the caller graph for this function:
|
private |
Definition at line 442 of file buffer-metadata.hpp.
Referenced by Table::fetch(), Table::fetch(), Table::remove(), Table::store(), and Table::verify_all_buffers_freed().
Collaboration diagram for Table: