| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…owth from repeated writes Use tracemalloc to measure memory usage.
You're linking to a PR where they had to fix-up such a test, as such, I'm not convinced this is worth it. |
Sorry, something went wrong.
|
In this case the allocations go on my machine from peak = 3067536 to peak = 0 blocks allocated. I think it's unlikely more allocations will happen in this empty global constant string write case. Even if we do add some new overheads with 200_000 iterations if we allocate 200_000 blocks probably worth making sure the change is intentional. Can up the constant further if worried about other overhead creep as the codebase evolves. |
Sorry, something went wrong.
|
This PR is stale because it has been open for 90 days with no activity. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Use tracemalloc to measure memory usage.
Fails before GH-151817, passes after. Validated by changing condition between > 0 and >= 0 and rebuilding + running make && ./python -m test test_io.test_textio -m "test_write_empty_no_memory_growth".
cpython/Modules/_io/textio.c
Line 1823 in 908f438
Inspired by the report memory usage helper in GH-152203 (If it gets more use should probably move to test.support).
cc: @StanFromIreland