cupy.cuda.PinnedMemoryPool¶
-
class
cupy.cuda.
PinnedMemoryPool
(allocator=_malloc)¶ Memory pool for pinned memory on the host.
Note that it preserves all allocated memory buffers even if the user explicitly release the one. Those released memory buffers are held by the memory pool as free blocks, and reused for further memory allocations of the same size.
Parameters: allocator (function) – The base CuPy pinned memory allocator. It is used for allocating new blocks when the blocks of the required size are all in use. Methods
-
free
(self, size_t ptr, Py_ssize_t size)¶
-
free_all_blocks
(self)¶ Release free all blocks.
-
malloc
(self, Py_ssize_t size) → PinnedMemoryPointer¶
-