On 16/06/2024 13:05, 'Dimitry Sibiryakov' via firebird-devel wrote:
> Hello All,
>
> I see in code that ParameterNode::pass2() allocates in impure area
> either impure_value or dsc and in ParameterNode::execute() these two
> possibilities are handled accordingly.
> At the same time in EVL_assign_to() the allocated memory is handled
> only as impure_value. Taking into account that only vlu_desc is accessed
> there and this field is the first, it may be safe enough.
It's probably not the only place this assumption exists.
> But what is the reason for conditional allocation then? Wouldn't it to
> be more robust to allocate impure_value or dsc always?
>
impure_value is large and necessary for parameters accessed in subroutines.
There is no reason to use more memory for all cases due to exceptional
cases.
Adriano