![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Template implementation of MMappedVector<T>.
More...
#include "MMappedVector.h"#include <cassert>#include <cerrno>#include <cstring>#include <new>#include <stdexcept>#include <vector>#include <fcntl.h>#include <unistd.h>#include <sys/mman.h>

Go to the source code of this file.
Template implementation of MMappedVector<T>.
Provides the out-of-line definitions of all MMappedVector<T> methods declared in MMappedVector.h. This file must be included by any translation unit that instantiates MMappedVector<T> for a specific T.
Implemented methods:
MMappedVector(): open/create the backing file and map it.~MMappedVector(): sync and unmap.operator[](k) const: read element k.operator[](k): write element k.add(): append one element, growing the file if necessary.sync(): flush dirty pages with msync().Internal helpers:
mmap(): map (or remap) length bytes.grow(): double the capacity and remap. Definition in file MMappedVector.hpp.