valgrind issues

2009-06-23 Thread Monty Taylor
Hey guys, We're valgrinding drizzle at the moment and see a lot of: # ==3378== 40 bytes in 1 blocks are still reachable in loss record 14 of 121 # ==3378==at 0x4A06D5C: operator new(unsigned long) (vg_replace_malloc.c:230) # ==3378==by 0x5894A8:

Re: valgrind issues

2009-06-23 Thread Kenton Varda
Did you call ShutdownProtobufLibrary() before checking for leaks? As it says, the memory in question is still reachable, so whether or not it is a leak is debatable. ShutdownProtobufLibrary() will go around and delete all the objects the library has allocated. It's a huge waste of time if

PB's vs ASN.1

2009-06-23 Thread Jon M
Hello, The system I am currently working on uses ASN.1 at the heart of the client/server communication. I am evaluating PB's for another part of the system that hasn't been implemented yet and was curious if anyone can point me to any articles/blogs comparing and contrasting PB's and ASN.1?

Deserializing a message for which I don't have the .proto (in Java)

2009-06-23 Thread Toph
Hi folks, I understand that protocol buffers messages are not fully self- describing. However, the message contains the field number, wire type, and value, right? In Java, how can I take a byte[] (array of bytes) that represents a message and deserialize it into a list of tuples that contain

Re: PB's vs ASN.1

2009-06-23 Thread Christopher Smith
No, but in short the advantages over ASN.1 can be summed up as simpler, and for most cases, more efficient. On 6/23/09, Jon M jonme...@yahoo.com wrote: Hello, The system I am currently working on uses ASN.1 at the heart of the client/server communication. I am evaluating PB's for another

encoding of embedded messages and repeated elements

2009-06-23 Thread etorri
Hello, The length delimited encoding basically tells that the following N bytes belong to this field. Wouldn't it be easier to instead use the number of elements that belong to the embedded message (repeated element). Now (as far as I have understood) the message needs to be built from

Re: encoding of embedded messages and repeated elements

2009-06-23 Thread Kenton Varda
The advantage of writing the length is that a parser can skip the entire sub-message easily without having to parse its contents. Otherwise, we would probably use the group encoding for sub-messages, where a special end tag marks the end of the message. On Tue, Jun 23, 2009 at 9:06 AM, etorri

Re: Deserializing a message for which I don't have the .proto (in Java)

2009-06-23 Thread Kenton Varda
You can use UnknownFieldSet, but be warned that the interface for that class is likely to change in a future version (because the current design is somewhat inefficient). If you just want to print the contents, you should be fine -- just parse into an UnknownFieldSet and then call its toString()