stldb::commit_buffer_t
// In header: </Users/bobw/workspace/stldb_lib/stldb/commit_buffer.h> template<typename void_alloc_type> class commit_buffer_t : public boost::intrusive::slist_base_hook< optimize_size< false >, void_pointer< void_alloc_type::pointer > > { public: // construct/copy/destruct commit_buffer_t(const void_alloc_type &); int op_count; };
Commit buffers are vector<chars> wrapped with basic_vectorstreams that are used to prepare and hold the serialized representation of transactions. Once serialization is complete, the log writing can be done using low-level I/O operations directly on the accumulated vector contents.
Commit buffers are allocated within the shared regions of databases, and when a process is done with them, they are recycled by putting them back into an intrusive list in the dbinfo of the database. This permits buffer reuse across processes, and also supports the aggregate transaction writing strategy of the Logger.