diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-03-03 23:20:25 +0000 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-03-03 23:20:25 +0000 |
commit | bc94ce6da5e1340819bed18d4320140fe38b5bd3 (patch) | |
tree | f5ed7ef8ce19539e69d16ff533778e25ae5f637a /Include | |
parent | 70a150881435be17082d1b7864199d3fe5a04477 (diff) | |
download | cpython-bc94ce6da5e1340819bed18d4320140fe38b5bd3.tar.gz |
Issue #7544: Preallocate thread memory before creating the thread to avoid a
fatal error in low memory condition.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/pystate.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/pystate.h b/Include/pystate.h index 4919d99b6c..b9fe61e721 100644 --- a/Include/pystate.h +++ b/Include/pystate.h @@ -105,6 +105,8 @@ PyAPI_FUNC(void) PyInterpreterState_Clear(PyInterpreterState *); PyAPI_FUNC(void) PyInterpreterState_Delete(PyInterpreterState *); PyAPI_FUNC(PyThreadState *) PyThreadState_New(PyInterpreterState *); +PyAPI_FUNC(PyThreadState *) _PyThreadState_Prealloc(PyInterpreterState *); +PyAPI_FUNC(void) _PyThreadState_Init(PyThreadState *); PyAPI_FUNC(void) PyThreadState_Clear(PyThreadState *); PyAPI_FUNC(void) PyThreadState_Delete(PyThreadState *); #ifdef WITH_THREAD |