api: add heap alloc to vpp stats
The Python VPP Stats module also used the VPP heap.
Fix so it now explicitly allocates a heap.
Fixes: f68fccfe7e188fec2c9f91da38ca9acf6f67d811
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I0bd4ae64d6c89cdf634d8d9a91c23ab38017c5cc
Signed-off-by: Ole Troan <ot@cisco.com>
diff --git a/src/vpp-api/python/vpp_papi/vpp_stats.py b/src/vpp-api/python/vpp_papi/vpp_stats.py
index 1a65c8e..5eb2b9d 100644
--- a/src/vpp-api/python/vpp_papi/vpp_stats.py
+++ b/src/vpp-api/python/vpp_papi/vpp_stats.py
@@ -85,6 +85,7 @@
uint64_t stat_segment_version(void);
uint64_t stat_segment_version_r(stat_client_main_t *sm);
void free(void *ptr);
+void vac_mem_init (size_t size);
""") # noqa: E501
@@ -203,6 +204,7 @@
except Exception:
raise VPPStatsClientLoadError("Could not open: %s" %
VPPStats.sharedlib_name)
+ self.api.vac_mem_init(0)
def connect(self):
self.client = self.api.stat_client_get()