Ethereal-dev: [Ethereal-dev] Memory allocation and management when dissecting a packet ...

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Richard Sharpe <sharpe@xxxxxxxxxx>
Date: Fri, 02 Nov 2001 12:25:15 +1030
Hi,

It seems that there will be occassions when you need dynamically allocated memory while dissecting a packet. Sub-dissectors may also need some memory as well.

Rather than having to explicitely free all that memory, or risking memory leaks, we could make available a g_chunk that dissectors could allocate out of, and when the dissection is complete, could free the chunk.

It is possibly too late to go back and do this now, but perhaps something to think about for a rewrite or next version.

--
Richard Sharpe, rsharpe@xxxxxxxxxx, LPIC-1
www.samba.org, www.ethereal.com, SAMS Teach Yourself Samba
in 24 Hours, Special Edition, Using Samba