|
pstore2
|
The file header and footer member functions. More...
#include <atomic>#include "pstore/core/address.hpp"#include "pstore/core/uuid.hpp"#include "pstore/serialize/types.hpp"

Go to the source code of this file.
Classes | |
| struct | pstore::serialize::serializer< extent< T > > |
A specialization which teaches the serialization framework how to read and write instances of extent. More... | |
| class | pstore::header |
| The data store file header. More... | |
| struct | pstore::header::body |
| Represents the portion of the header structure which is covered by the computed CRC value. More... | |
| struct | pstore::lock_block |
| The lock-block is a small struct placed immediately after the file header which is used by the transaction lock. More... | |
| struct | pstore::trailer |
| The transaction footer structure. More... | |
| struct | pstore::trailer::body |
| Represents the portion of the trailer structure which is covered by the computed CRC value. More... | |
Macros | |
| #define | PSTORE_INDICES |
| #define | X(a) a, |
Variables | |
| constexpr auto | pstore::leader_size = sizeof (header) + sizeof (lock_block) |
The file header and footer member functions.
The capacity of an individual segment is defined by offset_number_bits (i.e. the largest offset that we can encode before we need to start again with a new segment). This is 4Mb, which is considerably smaller than I'd like because of the fact that the Windows virtual memory system resizes the underlying file to match to ....
The initial state of the file is shown below. The file simply contains its header structure an an inital (empty) transaction (t0).
The header and footer types are pstore::header and pstore::trailer repectively. The state of the file after the first transaction (t1) has been committed:
A thread connecting to the data store uses the pstore::header::footer_pos value to find the most recent completed transaction; this is an instance of pstore::trailer and marks the end of the data associated with that transaction.
| #define PSTORE_INDICES |
1.8.13