Displaying 1 result from an estimated 1 matches for "vec_ptr".
2017 Jan 16
4
[RFC 0/2] Propose a new pointer trait.
...posing is this
(pseudocode, not the actual API):
int main() {
auto handle = pool::open("path/to/file", ...);
using pvector = std::vector<foo, persistent_allocator<foo>>;
{
auto tx = transaction::start(handle); // transactions are per pool file
auto vec_ptr = allocate_from_persistent_memory<pvector>();
vec_ptr->emplace_back(foo, parameters);
}
}
The problem occurs when standard library containers have metadata. For example
rb tree nodes carry their color, which will not be included in the
transaction's undo log. To address th...