Lumiera
0.pre.03
»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 | |
Entry * | fetch (HashVal hashID) |
fetch metadata record, if any More... | |
const Entry * | fetch (HashVal hashID) const |
void | remove (HashVal hashID) |
Entry & | store (Entry const &newEntry) |
store a copy of the given new metadata entry. More... | |
Private Types | |
typedef std::unordered_map< HashVal, Entry > | MetadataStore |
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 |
fetch metadata record, if any
hashID | for the Key part of the metadata entry |
Definition at line 452 of file buffer-metadata.hpp.
Referenced by BufferMetadata::get(), BufferMetadata::key(), and BufferMetadata::release().
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.
Referenced by BufferMetadata::store_as_locked().