+/*
+ * Ensure the message iterator's `stored_values` array is large enough to
+ * accommodate `storing_index`.
+ *
+ * We may need more slots in the array than initially allocated if more
+ * metadata arrives along the way.
+ */
+static void ensure_stored_values_size(ctf_msg_iter *msg_it, uint64_t storing_index)
+{
+ if (G_UNLIKELY(storing_index >= msg_it->stored_values->len)) {
+ g_array_set_size(msg_it->stored_values, msg_it->meta.tc->stored_value_count);
+ }
+}
+