aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include/odp_pool_internal.h
diff options
context:
space:
mode:
authorBill Fischofer <bill.fischofer@linaro.org>2017-01-10 09:59:40 -0600
committerMaxim Uvarov <maxim.uvarov@linaro.org>2017-01-12 18:01:12 +0300
commitfda9a9e4887eff3f0526c7bcef5e29ff511cd4d8 (patch)
tree8fb1c800433957c6f3d299eea82f3b8c024d8d36 /platform/linux-generic/include/odp_pool_internal.h
parent4aaa74fceecee7b1538546d0b67347569c1239c6 (diff)
linux-generic: pool: defer ring allocation until pool creation
To avoid excessive memory overhead for pools, defer the allocation of the pool ring until odp_pool_create() is called. This keeps pool memory overhead proportional to the number of pools actually in use rather than the architected maximum number of pools. This patch addresses Bug https://bugs.linaro.org/show_bug.cgi?id=2765 Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic/include/odp_pool_internal.h')
-rw-r--r--platform/linux-generic/include/odp_pool_internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/linux-generic/include/odp_pool_internal.h b/platform/linux-generic/include/odp_pool_internal.h
index 5d7b817e5..4915bdae4 100644
--- a/platform/linux-generic/include/odp_pool_internal.h
+++ b/platform/linux-generic/include/odp_pool_internal.h
@@ -69,7 +69,8 @@ typedef struct pool_t {
pool_cache_t local_cache[ODP_THREAD_COUNT_MAX];
- pool_ring_t ring;
+ odp_shm_t ring_shm;
+ pool_ring_t *ring;
} pool_t;