diff options
author | Jakub Zawadzki <darkjames@darkjames.pl> | 2014-04-29 08:57:40 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-05-02 21:07:07 +0000 |
commit | 5f239013e744de640cd37462e067a495912b9e65 (patch) | |
tree | 7cce61afb931680c1b8d606b98c9082ace3a4de3 /epan/wmem/wmem_scopes.c | |
parent | fa84054dc7c8a381d9665ddb2c6d22e0e96094b1 (diff) | |
download | wireshark-5f239013e744de640cd37462e067a495912b9e65.tar.gz |
wmem: add new simple block allocator, use it in packet-scope.
For packet-scope allocation, there's no need to support realloc(), free()
cause memory will be garbage collected after packet dissection.
(and this allocator is much faster than full block allocator).
Change-Id: I73fdf708c3077f48f55bdcc71f4fa859e4ac2335
Reviewed-on: https://code.wireshark.org/review/1428
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/wmem/wmem_scopes.c')
-rw-r--r-- | epan/wmem/wmem_scopes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/wmem/wmem_scopes.c b/epan/wmem/wmem_scopes.c index 15bb2b63cc..7ff17870e1 100644 --- a/epan/wmem/wmem_scopes.c +++ b/epan/wmem/wmem_scopes.c @@ -135,7 +135,7 @@ wmem_init_scopes(void) g_assert(file_scope == NULL); g_assert(epan_scope == NULL); - packet_scope = wmem_allocator_new(WMEM_ALLOCATOR_BLOCK); + packet_scope = wmem_allocator_new(WMEM_ALLOCATOR_BLOCK_FAST); file_scope = wmem_allocator_new(WMEM_ALLOCATOR_BLOCK); epan_scope = wmem_allocator_new(WMEM_ALLOCATOR_SIMPLE); |