summaryrefslogtreecommitdiffstats
path: root/src/sbefw
diff options
context:
space:
mode:
authorSachin Gupta <sgupta2m@in.ibm.com>2018-06-22 05:14:15 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2018-06-22 23:36:41 -0400
commite1d29fc77510a36e64d57800177e0d1cabd1ddcf (patch)
tree9cab10cfd069f45ec9deace22376bf7ee6d91539 /src/sbefw
parent8ea4ecdb8d568710cd8df12130397efc7edc3b73 (diff)
downloadtalos-sbe-e1d29fc77510a36e64d57800177e0d1cabd1ddcf.tar.gz
talos-sbe-e1d29fc77510a36e64d57800177e0d1cabd1ddcf.zip
Workaround for vector pool issue
Change-Id: I2a158ecbd6125a46341456ec5699c9c87d242a14 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/61167 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> (cherry picked from commit 82b4709602c4265d780518394ffed58ba74ccaa8) Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/61168
Diffstat (limited to 'src/sbefw')
-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