aboutsummaryrefslogtreecommitdiffstats
path: root/doc/README.wmem
AgeCommit message (Collapse)AuthorFilesLines
2018-05-02Test: Remove the Bash test scripts.Gerald Combs1-1/+1
They've been replaced by the Python scripts. Change-Id: I8add9c9ea0a6bdd68b2fa3841977863c0ea9a761 Reviewed-on: https://code.wireshark.org/review/27243 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-08-06doc: fix typos.Dario Lombardo1-3/+3
Change-Id: Id34affcb33c00e224dafbccc347b1d91b9e74c8d Reviewed-on: https://code.wireshark.org/review/16914 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-13Have wmem conform to checkAPIs.plMichael Mann1-6/+6
Yes, the rename of structure members is a bit hacky. Yes, catering to Windows since "GLib's v*printf routines are surprisingly slow on Windows". But it does pass checkAPIs.pl Change-Id: I5b1552472c83aa2e159f17b5b7eb70b37d03eff9 Reviewed-on: https://code.wireshark.org/review/15404 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-07Update README.wmemEvan Huus1-26/+66
It was getting stale in a few places, and I added a bunch of detail after discussions on https://code.wireshark.org/review/15270. Change-Id: Icd5ad954c4fbf592df0be63e6fb9440565a8efc1 Reviewed-on: https://code.wireshark.org/review/15280 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-02-04Update README.wmem, release notes for emem removalEvan Huus1-23/+17
Change-Id: Iac5066ff97d26de1660c38b9cd3f17781a521823 Reviewed-on: https://code.wireshark.org/review/6949 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-01-25Lua can free tvbuffs too earlyHadriel Kaplan1-1/+1
Lua-created tvbuffs should be kept around for the duration of pinfo's lifetime, instead of only for the duration of frame dissection. So instead of using the frame dissector's frame_end_routine, we'll register a callback to wmem for pinfo pool's allocator. Bug: 10888 Change-Id: I3e9db671c3f2a7cab9e258aca17f3be8acaf2417 Reviewed-on: https://code.wireshark.org/review/6768 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2014-09-17Update the doc directory to use https://www.wireshark.org.Gerald Combs1-1/+1
Change-Id: I9bfc57cb6b6ab6962b80ff58d98eb351d6f69829 Reviewed-on: https://code.wireshark.org/review/4140 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-05-14wmem documentation updatesEvan Huus1-12/+11
Change-Id: Ief20460ed8ec1b4bd1286cc2a5490d9aeefdf98f Reviewed-on: https://code.wireshark.org/review/1643 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-26Fix some wmem-related documentation.Evan Huus1-1/+10
Discovered while reviewing Ibd3efb92a203861f507ce71bc8d04d19d9d38a93 Change-Id: Ie4dfc1b9b7a99f14657148ed5a935bbb079c2b4e Reviewed-on: https://code.wireshark.org/review/415 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-14Remove $Id$ and other Subversion leftovers from the doc files.Jeff Morriss1-2/+0
Change-Id: I28a376f7e0fd90971f65ae9c1105a3ec85221470 Reviewed-on: https://code.wireshark.org/review/204 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2013-12-23From Ville Skyttä: Spelling FixesBill Meier1-1/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9591 svn path=/trunk/; revision=54387
2013-07-26Document that pinfo-scoped memory is also needed for anything passed toEvan Huus1-4/+5
add_new_data_source(). svn path=/trunk/; revision=50911
2013-07-21Add wmem queue 'implementation' by wrapping wmem_list and wmem_stack.Evan Huus1-2/+8
Also a bit of misc. refactoring of the stack while I was there, and doc tweaks. svn path=/trunk/; revision=50769
2013-07-20Replace wmem slist (singly-linked) with wmem list (doubly-linked).Evan Huus1-2/+2
The overhead is not large, and it makes append much faster (O(1) vs O(n)). It also will make a queue easy to add, which I need for a dissector I'm writing... svn path=/trunk/; revision=50744
2013-07-06Simple growable array implementation for wmem.Evan Huus1-1/+0
svn path=/trunk/; revision=50400
2013-06-18Update READMEs.Evan Huus1-14/+10
svn path=/trunk/; revision=50020
2013-06-16Update wmem README for the tree implementation.Evan Huus1-1/+3
svn path=/trunk/; revision=49967
2013-05-26First batch of doxygen for wmem. Remove some things from README.wmem now thatEvan Huus1-36/+6
they're in doxygen instead. svn path=/trunk/; revision=49583
2013-05-22Minor refactor: make the framework responsible for allocating and freeing theEvan Huus1-17/+18
actual wmem_allocator_t structure. This simplifies the internal API and deduplicates a few alloc/free calls in the individual allocator implementations. I'd originally made the allocators responsible for this on purpose with the idea that they'd be able to optimize something clever based on the type of allocator, but that's clearly more work and complexity than it's worth given the small number of allocators we create/destroy. svn path=/trunk/; revision=49512
2013-05-16Use a readable name for the wmem callback test. Warn that reallocing memoryEvan Huus1-3/+4
for which a callback is registered is also a fairly stupid thing to do. svn path=/trunk/; revision=49354
2013-05-08Round two of wmem cleanup callbacks. While the emem tree behaviour will requireEvan Huus1-22/+26
recurring callbacks, I suspect most other potential uses will be once-only, so make that possible, and improve the documentation on the remaining issues. Also separate out the code into its own files and the testing into its own test case. svn path=/trunk/; revision=49209
2013-05-07Add user callbacks to wmem. This feature is a generic way to transparently mimicEvan Huus1-0/+31
the behaviour emem has for seasonal trees, which is that the master tree structure is not actually seasonal - it is permanent. When the seasonal memory pool is cleared, the root node pointer in all of these permanent trees is set to NULL, and the pool takes care of actually freeing the nodes. Wmem can now mimic this by allocating the tree header struct in epan_scope(), allocating any node structs in file_scope(), and registering a callback on file_scope() that NULLs the pointer in the epan_scope() header. Yes, this is confusing, but it seemed simpler than adding manual callback registrations to every single dissector that currently uses seasonal trees. The callbacks may also be useful for other things that need cleanup (I'm thinking resource handles stored in wmem memory that need to be fclosed or what-have-you before they the handle is lost). As indicated by the number of caveats in README.wmem, the implementation probably needs a bit of work to make it safer/saner/more-useful. Thoughts (or patches!) in this direction are more than welcome. svn path=/trunk/; revision=49205
2013-05-01Remove singly-linked list from the wmem TODO list. Now that it has appendEvan Huus1-5/+0
all of the really important stuff is there, and emem doesn't provide it at all so it's not blocking migration. svn path=/trunk/; revision=49103
2013-04-26Wmem string-buffer improvements:Evan Huus1-1/+0
- better tests - fix a bug caught by the better tests - implement append_c and append_unichar, with tests Wmem string-buffers now have feature parity with their emem equivalents, so remove them from the TODO list. svn path=/trunk/; revision=49060
2013-04-25Summarize the API listing in the wmem README. Doxygen in the header files willEvan Huus1-42/+28
be much easier to keep in sync with the actual code. svn path=/trunk/; revision=49040
2013-04-22Add a section to the wmem README about testing.Evan Huus1-0/+14
svn path=/trunk/; revision=48990
2013-03-11Document the wmem override environment variable in the man pages, and improveEvan Huus1-7/+27
README.wmem in a couple of places. svn path=/trunk/; revision=48251
2013-03-09Remove the wmem slab. It was an optimization mimicking the emem slabEvan Huus1-7/+1
(removed in r48218) which did nothing particularly useful. Also lets us remove another debugging environment variable. svn path=/trunk/; revision=48219
2013-02-08Update wmem docsEvan Huus1-2/+3
svn path=/trunk/; revision=47549
2013-01-23Handle NULL-pointers and 0-lengths in a much simpler allocator-agnostic way,Evan Huus1-0/+6
and document the fact that allocator authors don't have to care. svn path=/trunk/; revision=47220
2013-01-19Rewrite wmem_allocator_simple to track allocations using a GHashTable instead ofEvan Huus1-1/+1
a GSList. This permits it to implement the new realloc and free functions. Also fill in an empty gc function, since there isn't much it can do as far as garbage-collection goes. svn path=/trunk/; revision=47169
2013-01-19Add three more slots to the wmem allocater definition (not yet implementedEvan Huus1-11/+49
by any particular allocator) and better document the entire structure. svn path=/trunk/; revision=47163
2013-01-15Minor documentation tweaks. Add a hash table to the wishlist.Evan Huus1-7/+9
svn path=/trunk/; revision=47101
2013-01-04Add convenience macros wmem_new and wmem_new0Evan Huus1-0/+2
svn path=/trunk/; revision=46941
2012-12-29Replace another instance of emem in README.developer with wmem.Evan Huus1-0/+1
svn path=/trunk/; revision=46847
2012-12-28Update wmem documentation for the new allocator.Evan Huus1-1/+4
Use the strict allocator when fuzzing (at least until the fuzz-bot starts running everything under valgrind). svn path=/trunk/; revision=46829
2012-12-27Add documentation about the environment variable.Evan Huus1-0/+6
svn path=/trunk/; revision=46817
2012-12-27Update wmem docs to include new type field.Evan Huus1-3/+11
svn path=/trunk/; revision=46815
2012-12-19Add missing wmem strbuf routine to the documentation.Evan Huus1-0/+1
svn path=/trunk/; revision=46625
2012-12-19Implement a basic singly-linked for wmem.Evan Huus1-2/+18
Re-implement the stack as a wrapper for that. svn path=/trunk/; revision=46607
2012-12-19Dispatch all allocator creations through a single function using an enum toEvan Huus1-16/+18
determine the desired type. This has two advantages over the old way: - just one environment variable for valgrind to override in order to guarantee that ALL allocators use memory it can track, and just one place to check that variable - allocator owners no longer have to include headers specific to their allocator, allowing them to change allocators without adjusting all their #includes svn path=/trunk/; revision=46604
2012-12-18Use 'new' instead of 'create' a consistent manner.Evan Huus1-6/+6
svn path=/trunk/; revision=46601
2012-12-08Recommend wmem over emem in the READMEs where possible.Evan Huus1-3/+3
svn path=/trunk/; revision=46472
2012-12-02Document the new pinfo pool, add a TODO list.Evan Huus1-7/+35
svn path=/trunk/; revision=46332
2012-11-25Add strdup_printf and strdup_vprintf to the wmem string utilities.Evan Huus1-0/+2
svn path=/trunk/; revision=46177
2012-11-25Allocate wmem memory in blocks of 8MB, not 10, because powers of two are nice.Evan Huus1-1/+1
svn path=/trunk/; revision=46175
2012-11-24Add the block allocator to the documentation.Evan Huus1-0/+3
svn path=/trunk/; revision=46169
2012-11-10More wmem documentation.Evan Huus1-20/+62
svn path=/trunk/; revision=45989
2012-11-09Update wmem README to reflect the fact that wmem_file_scope() now works.Evan Huus1-4/+1
svn path=/trunk/; revision=45978
2012-11-03More wmem documentation additions and updates. Still incomplete.Evan Huus1-13/+48
svn path=/trunk/; revision=45882