Add fixed-size, preallocated pool support 37/8237/9
authorDave Barach <dave@barachs.net>
Tue, 29 Aug 2017 15:43:37 +0000 (11:43 -0400)
committerDamjan Marion <dmarion.lists@gmail.com>
Fri, 1 Sep 2017 14:17:53 +0000 (14:17 +0000)
commitb7f1faa7fbd4575f28766e552a73810c6de0ace3
tree30343f8b6f4778250bd2bcb0d123aedfd7d8c172
parent774b217916ff34ea4ba89d117e93e5b3dd68276f
Add fixed-size, preallocated pool support

Simply call pool_init_fixed(...) before using the pool. Note that
fixed, preallocated pools live in individually-mmap'ed address
segments, except for the free element bitmap. A large fixed pool can
exceed 4gb.

Fix tcp buffer allocator leak, remove broken assert

Change-Id: I4421082e12a77c41c6e20f7747f3150dcd01fc26
Signed-off-by: Dave Barach <dave@barachs.net>
19 files changed:
src/svm/svm_fifo_segment.c
src/vnet/session/application_interface.c
src/vnet/session/session.c
src/vnet/session/session_cli.c
src/vnet/tcp/tcp.c
src/vnet/tcp/tcp_output.c
src/vppinfra.am
src/vppinfra/bihash_24_8.h
src/vppinfra/pool.c [new file with mode: 0644]
src/vppinfra/pool.h
src/vppinfra/test_fpool.c [new file with mode: 0644]
src/vppinfra/tw_timer_16t_1w_2048sl.h
src/vppinfra/tw_timer_16t_2w_512sl.h
src/vppinfra/tw_timer_1t_3w_1024sl_ov.h
src/vppinfra/tw_timer_2t_1w_2048sl.h
src/vppinfra/tw_timer_4t_3w_256sl.h
src/vppinfra/tw_timer_4t_3w_4sl_ov.h
src/vppinfra/tw_timer_template.c
src/vppinfra/tw_timer_template.h