diff --git a/pyopencl/array.py b/pyopencl/array.py
index f3874c7d7238e059a5b64ddabca2be91b18a8587..88c37a2fa884c1ba8d5561c763d81cbebdfb50aa 100644
--- a/pyopencl/array.py
+++ b/pyopencl/array.py
@@ -322,7 +322,7 @@ class Array(object):
 
                     self.data = cl.Buffer(context, cl.mem_flags.READ_WRITE, nbytes)
                 else:
-                    self.data = self.allocator(self.size * self.dtype.itemsize)
+                    self.data = self.allocator(nbytes)
             else:
                 self.data = None
         else:
diff --git a/src/wrapper/mempool.hpp b/src/wrapper/mempool.hpp
index bbf232756f221f04231e81c2acb43c04303b4753..b40094adf53f2533e31ebd546c84c7281660ddce 100644
--- a/src/wrapper/mempool.hpp
+++ b/src/wrapper/mempool.hpp
@@ -68,11 +68,13 @@ namespace PYGPU_PACKAGE
       unsigned m_active_blocks;
 
       bool m_stop_holding;
+      int m_trace;
 
     public:
       memory_pool(Allocator const &alloc=Allocator())
         : m_allocator(alloc.copy()),
-        m_held_blocks(0), m_active_blocks(0), m_stop_holding(false)
+        m_held_blocks(0), m_active_blocks(0), m_stop_holding(false),
+        m_trace(false)
       {
         if (m_allocator->is_deferred())
         {
@@ -99,6 +101,14 @@ namespace PYGPU_PACKAGE
         return l << mantissa_bits | chopped;
       }
 
+      void set_trace(bool flag)
+      {
+        if (flag)
+          ++m_trace;
+        else
+          --m_trace;
+      }
+
       static size_type alloc_size(bin_nr_t bin)
       {
         bin_nr_t exponent = bin >> mantissa_bits;
@@ -158,12 +168,21 @@ namespace PYGPU_PACKAGE
         bin_t &bin = get_bin(bin_nr);
 
         if (bin.size())
+        {
+          if (m_trace)
+            std::cout
+              << "[pool] allocation of size " << size << " served from bin " << bin_nr
+              << " which contained " << bin.size() << " entries" << std::endl;
           return pop_block_from_bin(bin, size);
+        }
 
         size_type alloc_sz = alloc_size(bin_nr);
 
         assert(bin_number(alloc_sz) == bin_nr);
 
+        if (m_trace)
+          std::cout << "[pool] allocation of size " << size << " required new memory" << std::endl;
+
         try { return get_from_allocator(alloc_sz); }
         catch (PYGPU_PACKAGE::error &e)
         {
@@ -171,10 +190,16 @@ namespace PYGPU_PACKAGE
             throw;
         }
 
+        if (m_trace)
+          std::cout << "[pool] allocation triggered OOM, running GC" << std::endl;
+
         m_allocator->try_release_blocks();
         if (bin.size())
           return pop_block_from_bin(bin, size);
 
+        if (m_trace)
+          std::cout << "[pool] allocation still OOM after GC" << std::endl;
+
         while (try_to_free_memory())
         {
           try { return get_from_allocator(alloc_sz); }
@@ -199,11 +224,17 @@ namespace PYGPU_PACKAGE
       void free(pointer_type p, size_type size)
       {
         --m_active_blocks;
+        bin_nr_t bin_nr = bin_number(size);
 
         if (!m_stop_holding)
         {
           inc_held_blocks();
-          get_bin(bin_number(size)).push_back(p);
+          get_bin(bin_nr).push_back(p);
+
+          if (m_trace)
+            std::cout << "[pool] block of size " << size << " returned to bin "
+              << bin_nr << " which now contains " << get_bin(bin_nr).size()
+              << " entries" << std::endl;
         }
         else
           m_allocator->free(p);
diff --git a/src/wrapper/wrap_mempool.cpp b/src/wrapper/wrap_mempool.cpp
index 4eb6bd8d194c84fb8b2da8f4331d918fb12cee85..73df3bd17bc35cecacc0ab2911943b5993caee4f 100644
--- a/src/wrapper/wrap_mempool.cpp
+++ b/src/wrapper/wrap_mempool.cpp
@@ -260,11 +260,11 @@ void pyopencl_expose_mempool()
   }
 
   {
-    typedef pyopencl::memory_pool<cl_allocator_base> cl;
+    typedef pyopencl::memory_pool<cl_allocator_base> cls;
 
     py::class_<
-      cl, boost::noncopyable,
-      boost::shared_ptr<cl> > wrapper("MemoryPool",
+      cls, boost::noncopyable,
+      boost::shared_ptr<cls> > wrapper("MemoryPool",
           py::init<cl_allocator_base const &>()
           );
     wrapper
@@ -272,6 +272,8 @@ void pyopencl_expose_mempool()
           py::return_value_policy<py::manage_new_object>())
       .def("__call__", device_pool_allocate,
           py::return_value_policy<py::manage_new_object>())
+      // undoc for now
+      .DEF_SIMPLE_METHOD(set_trace)
       ;
 
     expose_memory_pool(wrapper);