On Behalf Of Chris Luke
Sent: Thursday, April 12, 2018 4:01 PM
To: Bly, Mike ; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] vec_new() vs. vec_validate()
Vec_new always allocates storage, vec_validate ensures that an existing
allocation is at least a certain size, or create a new one if the pointer
size) whereas vec_validate can glean
that from the type of the vector (possibly NULL) you pass in.
Chris.
From: vpp-dev@lists.fd.io On Behalf Of Bly, Mike
Sent: Thursday, April 12, 2018 15:30
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] vec_new() vs. vec_validate()
Hello,
After some digging, near as
Hello,
After some digging, near as I can tell, for a new pointer to a new entity, it
would seem that vec_new() is pretty much providing the same results as
vec_validate(), albeit, with one less memset(bob, o, sizeof(*bob)) being
performed. However, I see a 10:1 usage (preference?) of vec_valida