Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tpie/btree/serialized_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ class serialized_store {
if ((flags & btree_flags::read) == 0) {
if ((flags & btree_flags::write) == 0)
throw invalid_file_exception("Either read or write must be supplied to serialized store");
f->rdbuf()->pubsetbuf(buffer, bufsize);
f->open(path, std::ios_base::out | std::ios_base::trunc | std::ios_base::binary);
if (!f->is_open())
throw invalid_file_exception("Open failed");
Expand Down Expand Up @@ -613,6 +614,8 @@ class serialized_store {

std::string path;
std::unique_ptr<std::fstream> f;
static constexpr size_t bufsize = 128 * 1024;
char buffer[bufsize];
internal_type current_internal, root_internal;
leaf_type current_leaf, root_leaf;

Expand Down