Re: [vpp-dev] A method to measure the allocated memory size for IKE SA

2019-08-19 Thread Jaemin Park
Thank you for your helpful comments. 2019년 8월 13일 (화) 오후 9:04, Damjan Marion 님이 작성: > 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

Re: [vpp-dev] A method to measure the allocated memory size for IKE SA

2019-08-13 Thread Damjan Marion via Lists.Fd.Io
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) *

Re: [vpp-dev] A method to measure the allocated memory size for IKE SA

2019-08-13 Thread Jaemin Park
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 님이 작성: > > > > On 13 Aug 2019, at 05:01, jmpar...@gmail.com wrote: > > > > Hi, all

Re: [vpp-dev] A method to measure the allocated memory size for IKE SA

2019-08-13 Thread Damjan Marion via Lists.Fd.Io
> On 13 Aug 2019, at 05:01, jmpar...@gmail.com 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

[vpp-dev] A method to measure the allocated memory size for IKE SA

2019-08-12 Thread jmpark81
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?