From 9d1423b9506c89a51a10b6119d01ce9a82a13b0c Mon Sep 17 00:00:00 2001
From: eb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Date: Wed, 30 Apr 2008 03:52:31 +0000
Subject: Merged features/inband-usb -r6431:8293 into trunk.

git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8295 221aa14e-8319-0410-a670-987f0aec2ac5
---
 pmt/src/lib/pmt_pool.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'pmt/src/lib/pmt_pool.h')

diff --git a/pmt/src/lib/pmt_pool.h b/pmt/src/lib/pmt_pool.h
index ac0c07bb61..42276a14f0 100644
--- a/pmt/src/lib/pmt_pool.h
+++ b/pmt/src/lib/pmt_pool.h
@@ -38,10 +38,13 @@ class pmt_pool {
   };
   
   omni_mutex	      d_mutex;
+  omni_condition      d_cond;
   
   size_t	      d_itemsize;
   size_t	      d_alignment;
   size_t	      d_allocation_size;
+  size_t	      d_max_items;
+  size_t	      d_n_items;
   item	       	     *d_freelist;
   std::vector<char *> d_allocations;
 
@@ -50,8 +53,11 @@ public:
    * \param itemsize size in bytes of the items to be allocated.
    * \param alignment alignment in bytes of all objects to be allocated (must be power-of-2).
    * \param allocation_size number of bytes to allocate at a time from the underlying allocator.
+   * \param max_items is the maximum number of items to allocate.  If this number is exceeded,
+   *	      the allocate blocks.  0 implies no limit.
    */
-  pmt_pool(size_t itemsize, size_t alignment = 16, size_t allocation_size = 4096);
+  pmt_pool(size_t itemsize, size_t alignment = 16,
+	   size_t allocation_size = 4096, size_t max_items = 0);
   ~pmt_pool();
 
   void *malloc();
-- 
cgit v1.2.3