+static app_listener_t *
+app_listener_get (application_t * app, u32 app_listener_index)
+{
+ return pool_elt_at_index (app->listeners, app_listener_index);
+}
+
+static void
+app_listener_free (application_t * app, app_listener_t * app_listener)
+{
+ clib_bitmap_free (app_listener->workers);
+ pool_put (app->listeners, app_listener);
+ if (CLIB_DEBUG)
+ memset (app_listener, 0xfa, sizeof (*app_listener));
+}
+
+static app_listener_t *
+app_local_listener_alloc (application_t * app)
+{
+ app_listener_t *app_listener;
+ pool_get (app->local_listeners, app_listener);
+ memset (app_listener, 0, sizeof (*app_listener));
+ app_listener->al_index = app_listener - app->local_listeners;
+ return app_listener;
+}
+
+static app_listener_t *
+app_local_listener_get (application_t * app, u32 app_listener_index)
+{
+ return pool_elt_at_index (app->local_listeners, app_listener_index);
+}
+
+static void
+app_local_listener_free (application_t * app, app_listener_t * app_listener)
+{
+ clib_bitmap_free (app_listener->workers);
+ pool_put (app->local_listeners, app_listener);
+ if (CLIB_DEBUG)
+ memset (app_listener, 0xfa, sizeof (*app_listener));
+}
+
+static app_worker_map_t *
+app_worker_map_alloc (application_t * app)
+{
+ app_worker_map_t *map;
+ pool_get (app->worker_maps, map);
+ memset (map, 0, sizeof (*map));
+ return map;
+}
+
+static u32
+app_worker_map_index (application_t * app, app_worker_map_t * map)
+{
+ return (map - app->worker_maps);
+}
+
+static void
+app_worker_map_free (application_t * app, app_worker_map_t * map)
+{
+ pool_put (app->worker_maps, map);
+}
+
+static app_worker_map_t *
+app_worker_map_get (application_t * app, u32 map_index)
+{
+ return pool_elt_at_index (app->worker_maps, map_index);
+}