Message347497
I opened this issue, because I was convinced that it would be easy to implement checks faster than gc.setthreshold(), but I failed to write efficient tests which detect the bugs that I listed above.
My approach was basically to check all objects tracked by the GC every N memory allocations (PyGC_Malloc): too slow. I tried to put thresholds per generation: it was still too slow.
Maybe recent objects should be checked often, but old objects should be checked less often. For example, only check objects in generation 0 and scan new objects, and then remember the size of generation 0. At the next check, ignore objects already checked.
I failed to find time and interest to implement this approach. I abandon this issue and my PR.
In the meanwhile, gc.set_threshold(5) can be used. It isn't too slow and is quite good to find most bugs listed in this issue. |
|
| Date |
User |
Action |
Args |
| 2019-07-08 14:24:04 | vstinner | set | recipients:
+ vstinner, methane, serhiy.storchaka, pablogsal |
| 2019-07-08 14:24:04 | vstinner | set | messageid: <1562595844.55.0.929894745485.issue36389@roundup.psfhosted.org> |
| 2019-07-08 14:24:04 | vstinner | link | issue36389 messages |
| 2019-07-08 14:24:04 | vstinner | create | |
|