Wireshark-commits: [Wireshark-commits] rev 50955: /trunk/epan/wmem/ /trunk/epan/wmem/: wmem_allocat

Date: Sat, 27 Jul 2013 22:27:29 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=50955

User: eapache
Date: 2013/07/27 03:27 PM

Log:
 Redesign of the wmem block allocator.
 
 What was becoming apparent as more dissectors started using wmem was that the
 old block allocator design had issues with memory fragmentation. This keeps the
 same underlying memory layout, but completely changes how free blocks are kept.
 It runs about 3% slower in my tests (still an order of magnitude faster than
 g_malloc) but uses about 1/3 the memory.
 
 I suspect some simple optimizations could reclaim that 3% as well - the design
 is fast, but I did not code particularly for speed.
 
 Thoroughly tested with the existing test suite (which caught half a dozen bugs
 in my first draft) so it should actually work!

Directory: /trunk/epan/wmem/
  Changes    Path                      Action
  +370 -297  wmem_allocator_block.c    Modified