diff options
author | Jakub Zawadzki <darkjames@darkjames.pl> | 2014-05-04 23:55:18 +0200 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-05-05 03:57:51 +0000 |
commit | f13bbf270744ade588427011618abba2ea12f789 (patch) | |
tree | 7231db7613a750bcd297ea11ed3eb38ab435d4c5 /epan/wmem/wmem_allocator_block_fast.c | |
parent | 8f2f7275717f07da2adeee81e70ddb8757fe3af3 (diff) |
Fast block allocator: make wmem_block_fast_hdr_t single linked list.
Double linked list was required by jumbo allocation.
No support for jumbo -> no need for double linked list -> have only 'next' pointer in header.
Change-Id: I48a0f468ebba9db3a63548d8e7307b6424c759ed
Reviewed-on: https://code.wireshark.org/review/1495
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/wmem/wmem_allocator_block_fast.c')
-rw-r--r-- | epan/wmem/wmem_allocator_block_fast.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/epan/wmem/wmem_allocator_block_fast.c b/epan/wmem/wmem_allocator_block_fast.c index c6ff565087..773c419965 100644 --- a/epan/wmem/wmem_allocator_block_fast.c +++ b/epan/wmem/wmem_allocator_block_fast.c @@ -55,7 +55,7 @@ /* The header for an entire OS-level 'block' of memory */ typedef struct _wmem_block_fast_hdr { - struct _wmem_block_fast_hdr *prev, *next; + struct _wmem_block_fast_hdr *next; gint32 pos; } wmem_block_fast_hdr_t; @@ -76,10 +76,7 @@ static inline void wmem_block_fast_add_to_block_list(wmem_block_fast_allocator_t *allocator, wmem_block_fast_hdr_t *block) { - block->prev = NULL; block->next = allocator->block_list; - if (block->next) - block->next->prev = block; allocator->block_list = block; } |