[protobuf] Arenas memory usage.

2017-03-21 Thread Seongho Cho
Hi. I'm using Protobuf 3.1. Is there a way to limit maximum memory usage of Arena? or would you let me know how determine Arena's memory usage? Thanks. -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and

[protobuf] Re: How Do I Build Just the C++ Libraries?

2017-03-21 Thread Doug Lewis
I rebuilt the libraries from a clean copy of the source and now I am finding all of the files that I need. Thanks, Doug On Monday, March 20, 2017 at 1:21:12 PM UTC-5, Doug Lewis wrote: > > Thanks for the suggestion Josh! > > I tried executing the make in the src directory and it completes >

[protobuf] C# convert message data to byte array in protobuf encoding

2017-03-21 Thread Matrix Guo
using pb = global::Google.Protobuf; private static byte[] FormatToBinary(T obj) { using (MemoryStream stream = new MemoryStream()) { pb::CodedOutputStream s = new pb::CodedOutputStream(stream); obj.WriteTo(s);

[protobuf] Re: C# convert message data to byte array in protobuf encoding

2017-03-21 Thread Jon Skeet
Just use the ToByteArray extension method... although if the code you've shown is returning an empty array, I'd expect ToByteArray to do so as well... On Tuesday, 21 March 2017 10:12:56 UTC, Matrix Guo wrote: > > using pb = global::Google.Protobuf; > private static byte[] FormatToBinary(T obj)

[protobuf] During G++ Link, cannot find google::protobuf::internal::MergeFromFail

2017-03-21 Thread Doug Lewis
When I'm making my application in Eclipse I get the following error during the link step: Invoking: Cross G++ Linker arm-uclinuxeabi-g++ -L../../myCommon/Debug -L../../myProtoBuffLib/Debug -L../../myCommon/pbLibs -L"/home/wsi/linux-cortexm-2.0.0/A2F/root/usr/lib" -o "lStat"

[protobuf] Re: Protobuf segmentation malloc error

2017-03-21 Thread Doug Lewis
I was having a similar problem at one point in my project development. We did 2 things to correct it: - I set the message type (Hardware in your case) to use Arena. After this the malloc error stopped occurring. This was a temporary fix to allow us to continue development. - We