Re: [RFA 14/22] Replace two xmallocs with vector

Tom Tromey
2016-10-13T02:04:10Z

>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

>> Often the performance doesn't matter, and std::vector is safe to use.
>> On the other hand XNEWVEC isn't really unsafe -- maybe just mildly less
>> clear to gdb newbies.

Pedro> Hmm, the code you're touching isn't using XNEWVEC, so I'm not sure
Pedro> I know exactly what you're referring to, but I assume you're thinking
Pedro> of the xmallocs you're replacing.

Yeah.

Hmm, if it's xmalloc (I'm looking at one patch where it's XCNEWVEC, but
apparently could be XNEWVEC without any loss), then I'm less sure.
XNEWVEC is at least reasonably type-safe, but plain xmalloc less so.

Anyway once unique_ptr is in I'll update all those patches and we can
discuss it more concretely.

Tom