aboutsummaryrefslogtreecommitdiffstats
path: root/doc/README.wmem
AgeCommit message (Collapse)AuthorFilesLines
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
2012-10-30Some documentation for wmem.Evan Huus1-0/+145
svn path=/trunk/; revision=45832