[issue35056] Test leaks of memory not managed by Python allocator
Erlend Egeberg Aasland
report at bugs.python.org
Thu Mar 18 16:03:39 EDT 2021
Erlend Egeberg Aasland <erlend.aasland at innova.no> added the comment:
> _sqlite: call sqlite3_config(SQLITE_CONFIG_MALLOC, pMem) to use PyMem_RawMalloc()
SQLite requires the xSize member of sqlite3_mem_methods to be implemented for this to work, so we'd have to implement msize(). The msize() idea seems to have been rejected in PEP 445, though it mentions using debug hooks to implement it.
See also https://www.sqlite.org/c3ref/mem_methods.html
Anyway, attached is a PoC patch with a fixed 10k mem pool for the sqlite3 module :)
----------
keywords: +patch
Added file: https://bugs.python.org/file49890/patch.diff
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35056>
_______________________________________
More information about the Python-bugs-list
mailing list