aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wmem/wmem_allocator_block_fast.c
AgeCommit message (Collapse)AuthorFilesLines
2016-05-13Have wmem conform to checkAPIs.plMichael Mann1-3/+3
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>
2014-05-23Add jumbo-allocation support to wmem fast blockEvan Huus1-5/+56
As it turns out, we do occasionally need it. Bug:10115 Change-Id: Ifec79e4d2470bbc09f15674534d01418a6571a0d Reviewed-on: https://code.wireshark.org/review/1688 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-05Several tweaks to fast block allocatorEvan Huus1-45/+24
- manually inline wmem_block_fast_add_to_block_list, it was only two lines and only called twice, so the function boilerplate was outweighing the abstraction - change free_all to release all but one block to the OS immediately, making gc a no-op; the alloc logic doesn't reuse later blocks anyways, so this was effectively a leak Change-Id: I033fbb2f3d87e58c7346cba10f2c710eaaa49e9f Reviewed-on: https://code.wireshark.org/review/1499 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-05Fast block allocator: make wmem_block_fast_hdr_t single linked list.Jakub Zawadzki1-4/+1
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>
2014-05-02wmem: add new simple block allocator, use it in packet-scope.Jakub Zawadzki1-0/+243
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>