[protobuf] google::protobuf::message not getting deallocated

2020-03-11 Thread Gaurav sahil
Google Protocol Buffer Version - 3.5.x Usage - Sharing the serialised data between different processes Issue - A google::protobuf::message is serialsed with dynamic allocation using message::New() and after serialisation it is deleted using message::Clear(). This function is not reducing the

[protobuf] Memory not getting deallocated.

2020-03-11 Thread Gaurav sahil
Google Protocol Buffer Version - 3.5.x Usage - Using it to share data between and embeded system and cloud. Issue - After packetizing the data we use ParentMessage->Clear(); function to clear the data. This function is not reducing the memory allocated. Checked in Google Protocol buffer

[protobuf] Re: Memory not getting deallocated.

2020-03-11 Thread Gaurav sahil
Please find the link aswell, https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.common Is there any other way to deallocate the memory ? On Wednesday, March 11, 2020 at 3:36:39 PM UTC+5:30, Gaurav sahil wrote: > > Google Protocol Buffer Version - 3.5.x >

Re: [protobuf] Re: Memory not getting deallocated.

2020-03-12 Thread Gaurav sahil
I feel Google protobuff is also using a memory pool internally.(placement NEW maybe) so once we clear(), it assigns the same memory to a new object. We analyzed the memory usage in smaps and observed that after reaching a particular memory threshold it doesn't increase further. I am curious