diff options
Diffstat (limited to 'mblock/src/lib/mb_message.cc')
-rw-r--r-- | mblock/src/lib/mb_message.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mblock/src/lib/mb_message.cc b/mblock/src/lib/mb_message.cc index 0bce455ce..ce98a931e 100644 --- a/mblock/src/lib/mb_message.cc +++ b/mblock/src/lib/mb_message.cc @@ -26,12 +26,13 @@ #include <stdio.h> #include <pmt_pool.h> -static const int CACHE_LINE_SIZE = 64; // good guess - - +static const int CACHE_LINE_SIZE = 64; // good guess +static const int MAX_MESSAGES = 1024; // KLUDGE max number of messages in sys + // 0 -> no limit #if MB_MESSAGE_LOCAL_ALLOCATOR -static pmt_pool global_msg_pool(sizeof(mb_message), CACHE_LINE_SIZE); +static pmt_pool +global_msg_pool(sizeof(mb_message), CACHE_LINE_SIZE, 16*1024, MAX_MESSAGES); void * mb_message::operator new(size_t size) |