Message196484
> Is it really impossible to use a standard Python dict instead of cfuhash?
I don't know if it is possible or not, I didn't try. Using PyDict has many requirements:
* the GIL must be held: I plan to hook also PyMem_Raw (which is called without the GIL being held)
* PyDict uses PyMem_Malloc() which would be a reentrant call
* the API uses PyObject* whereas tracemalloc uses C types and C structures
* PyDict can raises Python exceptions, which is not something expected from a memory allocator (especially PyMem_Malloc)
* etc.
The implementation is not done yet. I would like to be able to compute the size of memory allocated by the _tracemalloc module: size of hash tables. |
|
Date |
User |
Action |
Args |
2013-08-29 19:51:18 | vstinner | set | recipients:
+ vstinner, amaury.forgeotdarc |
2013-08-29 19:51:18 | vstinner | set | messageid: <1377805878.21.0.928319634969.issue18874@psf.upfronthosting.co.za> |
2013-08-29 19:51:18 | vstinner | link | issue18874 messages |
2013-08-29 19:51:17 | vstinner | create | |
|