Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-commits: [Wireshark-commits] rev 30624: /trunk/epan/ /trunk/epan/: emem.c

Date: Mon, 19 Oct 2009 22:31:13 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=30624

User: morriss
Date: 2009/10/19 03:31 PM

Log:
 From Jakub Zawadzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4140 :
 
 There is emem_header_t struct, so IMHO is better to use struct instead of
 global variables.
 
 Split emem_alloc() into two functions: emem_alloc_chunk and emem_alloc_glib.
 Current allocator is available in emem_header_t.memory_alloc
 
 It should be easier to develop new memory allocator and maintain current.
 It might also give some speedup (we don't need to check mem->debug_use_chunks
 every time :)
 
 From me:
 
 Initialize emem_header_t.trees.  Some indentation cleanup.

Directory: /trunk/epan/
  Changes    Path          Action
  +253 -203  emem.c        Modified