> A server application I am developing is reporting of System call write(buf)
> points to unitiialized byte(s) error when run through valgrind. It happens
> on a char* that is allocated and later memset to '\0' and partially (or
> fully) filled in later and sent across the network with a write(socket,
> buf, len). The only explaination on valgrind website about if the memory
> being used is not initialised, however, I believe the memory is being
You've initialised it all to zero, byt then you have copied in other
things and if any of those were uninitialised then the relevant part
of the buffer will then be uninitialised.
> What else could be causing this problem. It also says "Address 0x..... is 4
> bytes inside a block of 1024 alloc'd", what does this really mean? I have
> not seen a good explaination of this statement anywhere!! Any help is much
> appreciated. Thanks a googol.
It means that the address of the first uninitialised byte is the
address given and is four bytes from the start of the block in
question - a block whose total size is 1024 bytes.