diff --git a/common/hyperspace.cc b/common/hyperspace.cc index 0c2e1a88..757af47a 100644 --- a/common/hyperspace.cc +++ b/common/hyperspace.cc @@ -232,6 +232,8 @@ hyperdex :: operator >> (e::unpacker up, space& s) uint16_t num_indices; up = up >> s.id >> name >> s.fault_tolerance >> s.sc.attrs_sz >> num_subspaces >> num_indices; + strs.reserve(s.sc.attrs_sz + 1); + attrs.reserve(s.sc.attrs_sz); strs.push_back(std::string(name.cdata(), name.size())); s.name = strs.back().c_str();