cymem
cymem copied to clipboard
💥 Cython memory pool for RAII-style memory management
This seems like a very nice and useful little library. Definitely fills a need. Would you be willing to include support for aligned allocation? This is handled a little differently...
Hello, I can't get cymem to install with python 3.9 - there's no wheel, and building from source is failing. Would it be possible to provide a wheel for python...
cc @ngoldbaum The main changes here are basically due to not trying to mix C allocator and Python memory allocator via `memset` or `memcpy`. - Switched `Pool.alloc` to use `PyMem_Calloc`,...
Implements (1) as suggested by @rgommers in https://github.com/explosion/cymem/issues/47#issuecomment-2894478856. Basically builds without a warning, but isn't really safe.
From a quick look it seems like the main issue will be synchronizing access to the `Pool` state. So perhaps: - A per-instance `std::mutex` (from `libcpp.mutex`) within the `cymem.Pool` class....