OK, that is not exactly what you asked in your first email. If you want to find out size of struct and all child/indirect data, you will need to sum all of them manually.
Most of them are vectors, so you cal use vl() helper in gdb to get length. I.e. (gdb) p sizeof (ikev2_rekey_t) * vl(my_ikev2_struct.rekey) > On 13 Aug 2019, at 13:30, Jaemin Park <[email protected]> wrote: > > The invocation of sizeof() does not cover the whole allocated memory for IKE > SA. > That structure has the pointers of other nested structures, the pointers of > keys and so on. > > 2019년 8월 13일 (화) 오후 7:38, Damjan Marion <[email protected] > <mailto:[email protected]>>님이 작성: > > > > On 13 Aug 2019, at 05:01, [email protected] <mailto:[email protected]> > > wrote: > > > > Hi, all > > > > I'd like to measure the allocated memory size for the whole structure of > > IKE SA (ikev2_sa_t). > > Because ikev2_sa_t has many other struct types, it is not simple for me to > > measure the memory size. > > > > Is there any method like API or other function calls to measure the memory > > size for IKE SA? > > > maybe print sizeof (ikev2_sa_t) ? > > -- > Gmail 모바일에서 보낸 메일 > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > > View/Reply Online (#13721): https://lists.fd.io/g/vpp-dev/message/13721 > Mute This Topic: https://lists.fd.io/mt/32848977/675642 > Group Owner: [email protected] > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]] > -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#13722): https://lists.fd.io/g/vpp-dev/message/13722 Mute This Topic: https://lists.fd.io/mt/32848977/21656 Group Owner: [email protected] Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
