Given the following semantic value definition:
%union {
uda_tword_t val;
uda_tword_t val2[2];
uda_tint_t signed_val;
uda_taddr_t addr_val;
uda_debugger_pts_t pts;
char *str;
uda_binary_data_t *data;
}
where uda_binary_data_t is defined as:
typedef uint8_t uda_byte_t;
typedef struct uda_binary_data_struct
{
size_t len;
uda_byte_t *bytes;
} uda_binary_data_t;
Above, data->bytes is an arbitrary sequence of bytes allocated
via malloc. In practice, a large maximum size (on the order of
16K bytes) could be established. But if uda_binary_data_
is redefined as:
typedef struct uda_binary_data_struct
{
size_t len;
uda_byte_t bytes[16*1024];
} uda_binary_data_t;
my understanding is that bison will copy this 16K byte value
on each reduce operation. Is that correct?