From 230243378c0ddcc03dafbd277c58d1a2ff2b9b44 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 17 Sep 2025 15:32:46 -0400 Subject: [PATCH] [instancer/iup] Reduce mallocs again Perhaps shrink() shouldn't default to realloc. Working on it. --- src/hb-ot-var-common.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-var-common.hh b/src/hb-ot-var-common.hh index 9ab0134b7..1881251fa 100644 --- a/src/hb-ot-var-common.hh +++ b/src/hb-ot-var-common.hh @@ -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; }