[instancer/iup] Reduce mallocs again

Perhaps shrink() shouldn't default to realloc. Working on it.
This commit is contained in:
Behdad Esfahbod committed 2025-09-17 15:32:46 -04:00
1 parent 80a6f4b65e
commit 230243378c
1 file changed
+2 -2
+2 -2
View File
@@ -523,7 +523,7 @@ struct tuple_delta_t
o->tupleIndex = flag;
unsigned total_header_len = 4 + (peak_count + interim_count) * (F2DOT14::static_size);
compiled_tuple_header.shrink (total_header_len);
compiled_tuple_header.shrink (total_header_len, false);
return true;
}
@@ -600,7 +600,7 @@ struct tuple_delta_t
if (j != rounded_deltas.length) return false;
encoded_len += compile_deltas (compiled_deltas.as_array ().sub_array (encoded_len), rounded_deltas);
}
compiled_deltas.shrink (encoded_len);
compiled_deltas.shrink (encoded_len, false);
return true;
}