This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2013年11月27日 18:03 by vstinner, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| tracemalloc_memory_limit.patch | vstinner, 2013年11月27日 18:03 | review | ||
| tracemalloc_memory_limit-2.patch | vstinner, 2013年12月04日 01:00 | review | ||
| test_limit.patch | vstinner, 2013年12月04日 01:04 | review | ||
| Messages (5) | |||
|---|---|---|---|
| msg204605 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2013年11月27日 18:03 | |
It would be nice to add a memory_limit feature to the tracemalloc to make memory allocation fails if it would make the traced memory greater than the limit. See also the pyfailmalloc project which is similar but different: https://bitbucket.org/haypo/pyfailmalloc pyfailmalloc doesn't count allocated bytes, it schedules an error in N allocations where N is a random number. And pyfailmalloc only schedules one error, whereas I propose to make all memory allocations fails until the limit is respected. So if you only 0 bytes free (according to the limit), all memory allocations fail until some bytes are freed. Python currently behaves badly under very low memory condition. See also the issue #19437. |
|||
| msg205155 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2013年12月03日 21:15 | |
This feature cannot be used without a reliable PyErr_NoMemory(): I add issue #19835 as a dependency. |
|||
| msg205182 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2013年12月04日 01:00 | |
Updated patch. |
|||
| msg205183 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2013年12月04日 01:04 | |
test_limit.patch: Patch to test the memory_limit on the Python test suite. tracemalloc_memory_limit-2.patch and unittest_leak.patch (of issue #19880) are required to test it. |
|||
| msg205679 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2013年12月09日 11:40 | |
New changeset 45442f2a2494 by Victor Stinner in branch 'default': Issue #19817: Fix print_exception(), clear the exception on error http://hg.python.org/cpython/rev/45442f2a2494 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:54 | admin | set | github: 64016 |
| 2015年10月02日 21:08:14 | vstinner | set | status: open -> closed resolution: out of date |
| 2015年04月06日 16:44:43 | Arfrever | set | nosy:
+ Arfrever |
| 2013年12月09日 11:40:36 | python-dev | set | nosy:
+ python-dev messages: + msg205679 |
| 2013年12月04日 01:04:46 | vstinner | set | files:
+ test_limit.patch messages: + msg205183 |
| 2013年12月04日 01:01:00 | vstinner | set | files:
+ tracemalloc_memory_limit-2.patch messages: + msg205182 |
| 2013年12月03日 21:15:00 | vstinner | set | dependencies:
+ Add a MemoryError singleton to fix an unlimited loop when the memory is exhausted messages: + msg205155 |
| 2013年11月27日 18:03:12 | vstinner | create | |