summaryrefslogtreecommitdiffstats
path: root/Include/pystate.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-03-03 23:20:25 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-03-03 23:20:25 (GMT)
commit71fb87e64c51627564262fd64299f7ac79625404 (patch)
treedf72f580ff07a3bd5419e3a3509a8c5806a51836 /Include/pystate.h
parent2379bb664ac33b77d076a9a8db59f73af9eb3c8f (diff)
downloadcpython-71fb87e64c51627564262fd64299f7ac79625404.zip
cpython-71fb87e64c51627564262fd64299f7ac79625404.tar.gz
cpython-71fb87e64c51627564262fd64299f7ac79625404.tar.bz2
Issue #7544: Preallocate thread memory before creating the thread to avoid a
fatal error in low memory condition.
Diffstat (limited to 'Include/pystate.h')
-rw-r--r--Include/pystate.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/pystate.h b/Include/pystate.h
index 4919d99..b9fe61e 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