[protobuf] proto buffer file size control
Hello All, What are the functionality to use in protocol buffer to control the file size in which I am writing serialized data. I want the maximum file size to 5MB and then to start writing the new file. How this can be achieve in coded output stream Thanks and Regards Nikhil -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
[protobuf] Mutable pointer not consistent with official doc.
Hi all, As said in the official document [C++ Generated Code https://developers.google.com/protocol-buffers/docs/reference/cpp-generated::Singular String Fields]: https://lh4.googleusercontent.com/-oYL7QapLFwA/VI_h8UnnW1I/AFs/EKBP3yHOz0s/s1600/0.png But in my test, the string pointed by the returned pointer just has the default value. My test environment is Win764bit, Visual Studio 2013. Here is my test: *Message definition:* https://lh6.googleusercontent.com/-r19642fX7_A/VI_ihF6yEhI/AF0/WgbNZeFnGEc/s1600/1.png *Test code:(without set the string field before use its mutable pointer)* https://lh5.googleusercontent.com/-w1aWpS9uEw4/VI_iuJuVDTI/AF8/XXMNOCrftE0/s1600/2.png *Result:* https://lh4.googleusercontent.com/-3JmIUw0XnFo/VI_jWmIiC1I/AGM/e7E6bKyC4NA/s1600/3.png Why? Please notice me if I misunderstood the doc. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
Re: [protobuf] Mutable pointer not consistent with official doc.
I think this is a bug in the implementation. Filed issue: https://github.com/google/protobuf/issues/141 On Mon, Dec 15, 2014 at 11:47 PM, John Sun ih4...@gmail.com wrote: Hi all, As said in the official document [C++ Generated Code https://developers.google.com/protocol-buffers/docs/reference/cpp-generated::Singular String Fields]: https://lh4.googleusercontent.com/-oYL7QapLFwA/VI_h8UnnW1I/AFs/EKBP3yHOz0s/s1600/0.png But in my test, the string pointed by the returned pointer just has the default value. My test environment is Win764bit, Visual Studio 2013. Here is my test: *Message definition:* https://lh6.googleusercontent.com/-r19642fX7_A/VI_ihF6yEhI/AF0/WgbNZeFnGEc/s1600/1.png *Test code:(without set the string field before use its mutable pointer)* https://lh5.googleusercontent.com/-w1aWpS9uEw4/VI_iuJuVDTI/AF8/XXMNOCrftE0/s1600/2.png *Result:* https://lh4.googleusercontent.com/-3JmIUw0XnFo/VI_jWmIiC1I/AGM/e7E6bKyC4NA/s1600/3.png Why? Please notice me if I misunderstood the doc. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
Re: [protobuf] Protobuf Buffers v3.0.0-alpha-1
On Mon, Dec 15, 2014 at 8:33 PM, Sumit Kumar kumar.su...@hotmail.com wrote: Does Arena allocator support custom memory pool override ? Can NUMA aware memory pools be used instead ? No. We can consider adding support for custom memory pools, but I think it might be very hard. The current arena code has its built-in memory allocation mechanism and is highly optimized for that. Supporting custom memory pools will probably require a rewrite of arena code. Any change to the set_allocated ? We added a new generated method unsafe_arena_set_allocated which behaves the same way as the old set_allocated. The new set_allocated implementation will check whether the passed-in object is on the same arena of the containing message and if it's not, a copy will be made. Regards, Sumit Kumar On 13 Dec 2014, at 2:20 am, 'Feng Xiao' via Protocol Buffers protobuf@googlegroups.com wrote: On Fri, Dec 12, 2014 at 5:56 AM, Jeremy Swigart jswig...@gmail.com wrote: Does the arena allocator also get used by messages allocated as children of the root message? Yes. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.