summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/sbefw/core/pool.C12
-rw-r--r--src/sbefw/core/pool.H7
2 files changed, 13 insertions, 6 deletions
diff --git a/src/sbefw/core/pool.C b/src/sbefw/core/pool.C
index 93c67bb4..c79dafa8 100644
--- a/src/sbefw/core/pool.C
+++ b/src/sbefw/core/pool.C
@@ -5,7 +5,8 @@
/* */
/* OpenPOWER sbe Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2017 */
+/* Contributors Listed Below - COPYRIGHT 2015,2018 */
+/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
@@ -35,7 +36,8 @@ vectorMemPool_t g_pool[G_POOLSIZE];
vectorMemPool_t * allocMem()
{
vectorMemPool_t *pool = NULL;
- for( size_t idx = 0; idx < G_POOLSIZE; idx++ )
+ size_t idx;
+ for( idx = 0; idx < G_POOLSIZE; idx++ )
{
if( 0 == g_pool[idx].refCount )
{
@@ -44,7 +46,11 @@ vectorMemPool_t * allocMem()
break;
}
}
- SBE_DEBUG(" Giving pool 0x%08X", pool);
+ if(NULL == pool )
+ {
+ SBE_ERROR("NULL pool idx:%u", idx);
+ pk_halt();
+ }
return pool;
}
diff --git a/src/sbefw/core/pool.H b/src/sbefw/core/pool.H
index 325a5aa6..040729ff 100644
--- a/src/sbefw/core/pool.H
+++ b/src/sbefw/core/pool.H
@@ -5,7 +5,8 @@
/* */
/* OpenPOWER sbe Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* Contributors Listed Below - COPYRIGHT 2016,2018 */
+/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
@@ -29,10 +30,10 @@ namespace SBEVECTORPOOL
{
// Size of a block for a vector
-static const size_t G_BLOCKSIZE = 512;
+static const size_t G_BLOCKSIZE = 256;
//Pool size
-static const size_t G_POOLSIZE = 4;
+static const size_t G_POOLSIZE = 6;
typedef struct
{
OpenPOWER on IntegriCloud