return sample_count_;
}
-double Segment::start_time() const
+const pv::util::Timestamp& Segment::start_time() const
{
return start_time_;
}
assert(capacity_ >= sample_count_);
if (new_capacity > capacity_) {
- capacity_ = new_capacity;
+ // If we're out of memory, this will throw std::bad_alloc
data_.resize((new_capacity * unit_size_) + sizeof(uint64_t));
+ capacity_ = new_capacity;
}
}