Wireshark-dev: Re: [Wireshark-dev] Performance plug-in problem

From: Stephen Fisher <steve@xxxxxxxxxxxxxxxxxx>
Date: Thu, 26 Aug 2010 14:33:07 -0600
On Thu, Aug 26, 2010 at 1:54 PM, Guillaume PETIT
<guillaume1360@xxxxxxxxx> wrote:

> To group my word, i define a array: tab[256][256] in which a class my word.
> My plug-in is decoding properly my protocol on 1 frame.
>
> Nevertheless, when I load a capture of 50Mbytes, Wireshark crash. I don't
> understand why.

It's probably running out of memory because of the static 256 x 256
(64k) arrays that the dissector is using.  How about using dynamic
memory allocation (using the ep_ functions so the memory is
automatically freed after dissecting the current packet) and not
allocating more memory than is required at a time?