diff --git a/pyopencl/mempool.py b/pyopencl/mempool.py index 38c1056274cfa6d849663821581b347644727ab6..bd804799c95d921bd1aea60babf82f18c791200d 100644 --- a/pyopencl/mempool.py +++ b/pyopencl/mempool.py @@ -152,11 +152,6 @@ class MemoryPool(object): assert not (ones & head) return head | ones - def allocate(self): - pass - - __call__ = allocate - def stop_holding(self): self.stop_holding = True self.free_held() @@ -225,6 +220,8 @@ class MemoryPool(object): routine="memory_pool::allocate", code=cl.status_code.MEM_OBJECT_ALLOCATION_FAILURE) + __call__ = allocate + def free(self, buf, size): self.active_blocks -= 1 bin_nr = self.bin_number(size)