I'm not even sure if it's a "memory bug." I just know there is an issue... somewhere.
----- Original Message ----- From: Brett McCoy To: [email protected] Sent: Wednesday, February 04, 2009 11:30 AM Subject: Re: [c-prog] issues with libpcap code One thing I recommend if you are doing any kind of dynamic memory allocation and other kinds of memory management is to get yourself a tool like valgrind. It can analyze your app and profile it, it's very helpful for chasing down memory bugs like this. http://valgrind.org/ On Wed, Feb 4, 2009 at 1:24 PM, Tyler Littlefield <[email protected]> wrote: > I'm not using windows, it's on linux. > any idea how to do this in g++? > > ----- Original Message ----- > From: Ranju V > To: [email protected] > Sent: Wednesday, February 04, 2009 11:10 AM > Subject: Re: [c-prog] issues with libpcap code > > > On Wed, Feb 4, 2009 at 12:41 PM, Tyler Littlefield <[email protected]> wrote: > > Hello list, > > I've got the following code I'm using as a packet sniffer. > > Other than suggesting that you try the winpcap forums, I can only > think of compiler struct padding. When you define structs, the > compiler might pad some additional bytes into the structure to make it > align with memory boundaries. Depending on what compiler you are > using, there are ways and means of turning automatic struct padding > off. If you are using MSVC++ for instance, there are "#pragma"s you > can use to do this. See here - > http://msdn.microsoft.com/en-us/library/2e70t5y1(VS.80).aspx. > > -- > Ranju. V > http://blogorama.nerdworks.in/ > -- > > > > > [Non-text portions of this message have been removed] > > > ------------------------------------ > > To unsubscribe, send a blank message to <mailto:[email protected]>.Yahoo! Groups Links > > > > -- ---------------------------------------------------------- "In the rhythm of music a secret is hidden; If I were to divulge it, it would overturn the world." -- Jelaleddin Rumi [Non-text portions of this message have been removed]
