Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 18935: /trunk/epan/ /trunk/epan/diss
From: "ronnie sahlberg" <[email protected]>
Date: Thu, 17 Aug 2006 15:54:19 +1000


On 8/17/06, Guy Harris <[email protected]> wrote:

Should we have versions of the routines that allocate ep_ and se_ things
that take, as an argument, an "emem_chunk_t *", and allocate from that
storage pool, and have routines to create and destroy storage pools?
_______________________________________________


Yes.  I think that would be a good idea.
That would trivially allow us multiple concurrent ep-chunks.


One thing that might benefit from that would be that there are some items that should only have packet scope but are left hanging around and not released until a few packets later.
I think it was the FIELD_INFO structures in epan/proto.c that are now handled by a SLAB allocator   but could not be moved over to ep allocations since not every single item allocated during packet dissection is released immediately.   some of them are released after the next packet is dissected.
(im going from memory,   i think it was FIELD_INFO    it could also have been one of the other very busy SLAB allocators we use)
I never fully analyzed why this was so   but multiple concurrent ep chunks may make a SLAB->ep conversion easier.




Another benefit would be that in a very distant future when we might support multithreading when dissecting packets it would make it trivial to have one ep-chunk for each independant thread.