Minimize bihash memory consumption 49/10449/3
authorDave Barach <dave@barachs.net>
Wed, 7 Feb 2018 18:14:06 +0000 (13:14 -0500)
committerDamjan Marion <dmarion.lists@gmail.com>
Thu, 8 Feb 2018 10:02:16 +0000 (10:02 +0000)
commite7d212fe41de88863884dc24dff9e24e5f37b421
tree4d38c30d330de2ce27207bdcee537f7874f62574
parentdb3c480e375bd7eb22c27887590c8dca07293719
Minimize bihash memory consumption

Reference-count the number of entries in each bucket. If the reference
count goes to zero, free the backing store.

Add long-term churn-testing to test_bihash_template.c, thanks to
Andrew Yourtchenko for the initial implementation.

Change-Id: I4fbd9229cacfaba8027a85cbf87b74afdead6e39
Signed-off-by: Dave Barach <dave@barachs.net>
src/vppinfra/bihash_template.c
src/vppinfra/bihash_template.h
src/vppinfra/test_bihash_template.c