Open GoogleCodeExporter opened 9 years ago
This is not an error in LevelDB. Your struct has extra padding in it that is
not initialized in the constructor. See the attached file for details. Notice
that the members of WCData consume 19B total, but WCData is 24B.
You can eliminate the error by rearranging your struct to not waste space,
using memset(this, 0, sizeof(WCData)) if WCData is a POD type, or by explicitly
telling valgrind to ignore this harmless uninitialized data.
What you should probably do is serialize the WCData struct into a
compiler/byte-order independent format and store serialized strings instead of
the struct itself.
Original comment by res...@gmail.com
on 23 Oct 2013 at 11:09
Attachments:
hhhmm... thanks for your response. I was trying the memset however I guess I
didn't fully realize that my struct is not a compact POD...
Original comment by sameer.s...@gmail.com
on 23 Oct 2013 at 11:39
Original issue reported on code.google.com by
sameer.s...@gmail.com
on 23 Oct 2013 at 5:50Attachments: