Age | Commit message (Collapse) | Author | Files | Lines |
|
svn path=/trunk/; revision=54280
|
|
svn path=/trunk/; revision=54114
|
|
wmem_list_remove_frame(wmem_list_tail())
svn path=/trunk/; revision=53088
|
|
doubling leads to all sorts of very subtle badness (including test failures due
to funny internal assertions because the two wmems have mismatching state).
Make wmem_init and wmem_cleanup PUBLIC instead of LOCAL so that they don't get
stripped and don't cause a link failure when trying to build oids_test (now that
it's not linking with libwmem explicitly). There is possibly a better way to fix
this, but I'm not sure what it is.
svn path=/trunk/; revision=52694
|
|
WIRESHARK_DEBUG_WMEM_OVERRIDE environment variable once in wmem_init, not every
time wmem_allocator_new is called. We currently create a new pinfo pool for
every packet we dissect, so this is a small performance win, especially when
getenv is slow (which may happen if a large number of environment variables are
set, such as when fuzz-testing).
svn path=/trunk/; revision=52634
|
|
when running tests on Solaris. Revert back to byte-at-a-time, but do fewer bytes
to avoid a performance hit.
svn path=/trunk/; revision=52617
|
|
anyways, since Michael made key operations non-destructive in r44380.
svn path=/trunk/; revision=52583
|
|
use a 1500-byte string as a key, so be it. It will be slow, but at least it will
work.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9078
svn path=/trunk/; revision=52261
|
|
stress-test by another ~10%.
svn path=/trunk/; revision=51840
|
|
a NULL allocator. This gives us a single, central place to handle out-of-memory
errors (by, for example, throwing an exception) for basically all of epan.
The only remaining glib memory that is directly allocated is for the hash tables
used by the simple and strict allocators.
svn path=/trunk/; revision=51627
|
|
doesn't return (do to, for example, throwing an exception) the allocator is
left in a consistent state.
svn path=/trunk/; revision=51626
|
|
makes canary checking about 20% faster, which should speed up fuzz-testing now
that more and more dissectors use wmem.
svn path=/trunk/; revision=51620
|
|
header later causes it to be redefined - as happens on my Solaris 11
virtual machine - we get a redefinition warning, which gets treated as
an error.
svn path=/trunk/; revision=51344
|
|
Make epan_free a no-op if the pointer is NULL. This fixes 99% of the cases
causing problems for wmem_leave_file_scope() - remove that XXX comment and add
back the assertion.
Remove the cleanup_dissection call from epan_cleanup, it doesn't make sense
there. init_dissection is only called from epan_new, so cleanup_dissection
should only be called from epan_free.
Add one missing epan_free call to tshark revealed by the above changes.
svn path=/trunk/; revision=51342
|
|
splitting an existing chunk. Thanks to Jeff for catching this one.
svn path=/trunk/; revision=51325
|
|
compiler and provides a surprising (if fairly small) performance win.
svn path=/trunk/; revision=51305
|
|
consistency (they are called just once and will be inlined by any reasonable
compiler).
Also add some comments, fix some spacing etc. No functional changes.
svn path=/trunk/; revision=51304
|
|
compilers that decide not to inline.
svn path=/trunk/; revision=51303
|
|
svn path=/trunk/; revision=51302
|
|
of a jumbo flag in the chunk header.
svn path=/trunk/; revision=51299
|
|
doubly-linked list at the head of each block. This was intended as a step
towards supporting allocations bigger than the usual block size, but also shows
up as a 2% performance improvement in the speed test, so win-win.
svn path=/trunk/; revision=51298
|
|
doing all the safety checks was unnecessarily slow. Do only the appropriate
checks for each case.
svn path=/trunk/; revision=51296
|
|
../../epan/wmem/wmem_user_cb.h:52:11: error: parameter 'allocator' not found in the function declaration
[-Werror,-Wdocumentation]
* @param allocator The allocator that triggered this callback.
^~~~~~~~~
../../epan/wmem/wmem_user_cb.h:53:11: error: parameter 'event' not found in the function declaration
[-Werror,-Wdocumentation]
* @param event The event type that triggered this callback.
^~~~~
../../epan/wmem/wmem_user_cb.h:54:11: error: parameter 'user_data' not found in the function declaration
[-Werror,-Wdocumentation]
* @param user_data Whatever user_data was originally passed to the call to
^~~~~~~~~
../../epan/wmem/wmem_user_cb.h:63:11: error: parameter 'recurring' not found in the function declaration
[-Werror,-Wdocumentation]
* @param recurring If this is FALSE then the callback is called exactly once.
^~~~~~~~~
4 errors generated.
svn path=/trunk/; revision=51259
|
|
free chunks of sufficient size.
svn path=/trunk/; revision=51234
|
|
svn path=/trunk/; revision=51218
|
|
pointer we return.
svn path=/trunk/; revision=51217
|
|
bother splitting. This greatly simplifies the logic, trims another 4% off the
fast path, and doesn't actually affect the results at all because of the way we
pad for alignment anyways.
svn path=/trunk/; revision=51216
|
|
test.
svn path=/trunk/; revision=51112
|
|
svn path=/trunk/; revision=51111
|
|
svn path=/trunk/; revision=51110
|
|
if the right-hand merge target was there originally. This brings memory usage
down another ~40% when running the heavy test suite.
This also lets us extract the master-list check out of unfree() since it is now
only relevant at a single caller, and turns unfree into the more understandable
remove_from_recycler().
svn path=/trunk/; revision=51104
|
|
with emem.
svn path=/trunk/; revision=51045
|
|
svn path=/trunk/; revision=51014
|
|
Removes one branch from the hot path, deduplicates one function call in the cold
path by effectively falling through, and makes it more obvious what the code is
actually trying to do.
svn path=/trunk/; revision=51013
|
|
svn path=/trunk/; revision=50977
|
|
to override that to simple for valgrinding (we still force the allocator in the
allocator and timing tests, of course).
svn path=/trunk/; revision=50971
|
|
algorithm.
Also add a test case to excercise it for future.
svn path=/trunk/; revision=50970
|
|
Move a few assignments around to avoid one extra subtraction. I suspect having
the two if statements next to each other is friendly to the compiler's optimizer
as well.
Shaves ~1.3% off my timing tests, bringing the new design *very* close to the
old one in raw allocation speed.
svn path=/trunk/; revision=50961
|
|
unobtrusive if statement got dropped. Without it the allocator exhibits the old
bad behaviour of 3x memory usage and heavy fragmentation.
We want it back, thank you very much.
svn path=/trunk/; revision=50960
|
|
svn path=/trunk/; revision=50959
|
|
variable it affected, since that variable wasn't used for any other purpose.
svn path=/trunk/; revision=50958
|
|
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!
svn path=/trunk/; revision=50955
|
|
svn path=/trunk/; revision=50954
|
|
svn path=/trunk/; revision=50919
|
|
Also a bit of misc. refactoring of the stack while I was there, and doc tweaks.
svn path=/trunk/; revision=50769
|
|
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
|
|
'i' has type 'bar' [-Wformat].
svn path=/trunk/; revision=50639
|
|
svn path=/trunk/; revision=50411
|
|
some circumstances. Use array_index as a variable name instead, to
avoid warnings.
svn path=/trunk/; revision=50404
|
|
whitespace.
svn path=/trunk/; revision=50401
|