[cff-subset] Adjust pre-allocation
Reduces memory use significantly.
This commit is contained in:
parent
b88ca81814
commit
0ec0214f10
|
@ -522,7 +522,7 @@ struct parsed_values_t
|
|||
|
||||
void alloc (unsigned n)
|
||||
{
|
||||
values.alloc (n);
|
||||
values.alloc (n, true);
|
||||
}
|
||||
|
||||
void add_op (op_code_t op, const byte_str_ref_t& str_ref = byte_str_ref_t ())
|
||||
|
|
|
@ -644,7 +644,7 @@ struct subr_subsetter_t
|
|||
ENV env (str, acc, fd);
|
||||
cs_interpreter_t<ENV, OPSET, subr_subset_param_t> interp (env);
|
||||
|
||||
parsed_charstrings[i].alloc (str.length / 2);
|
||||
parsed_charstrings[i].alloc (str.length);
|
||||
subr_subset_param_t param (&parsed_charstrings[i],
|
||||
&parsed_global_subrs_storage,
|
||||
&parsed_local_subrs_storage[fd],
|
||||
|
|
Loading…
Reference in New Issue