session: use pool for segment manager properties
Change-Id: I280fea2610dcfc0b2da84973b9f567daec42f1f6
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/session/segment_manager.h b/src/vnet/session/segment_manager.h
index 8c43880..f649461 100644
--- a/src/vnet/session/segment_manager.h
+++ b/src/vnet/session/segment_manager.h
@@ -59,7 +59,7 @@
* Pointer to manager properties. Could be shared among all of
* an app's segment managers s
*/
- segment_manager_properties_t *properties;
+ u32 properties_index;
/**
* First segment should not be deleted unless segment manger is deleted.
@@ -96,9 +96,7 @@
segment_manager_t *segment_manager_new ();
int
-segment_manager_init (segment_manager_t * sm,
- segment_manager_properties_t * properties,
- u32 seg_size);
+segment_manager_init (segment_manager_t * sm, u32 props_index, u32 seg_size);
void segment_manager_get_segment_info (u32 index, u8 ** name, u32 * size);
int
@@ -122,6 +120,11 @@
unix_shared_memory_queue_t * q);
void segment_manager_app_detach (segment_manager_t * sm);
+segment_manager_properties_t *segment_manager_properties_alloc (void);
+void segment_manager_properties_free (segment_manager_properties_t * p);
+segment_manager_properties_t *segment_manager_properties_get (u32 smp_index);
+u32 segment_manager_properties_index (segment_manager_properties_t * p);
+
#endif /* SRC_VNET_SESSION_SEGMENT_MANAGER_H_ */
/*
* fd.io coding-style-patch-verification: ON