Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
fef7e94f
Kaydet (Commit)
fef7e94f
authored
Eyl 10, 2016
tarafından
Łukasz Langa
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Don't run garbage collection on interpreter exit if it was explicitly disabled
by the user.
üst
9e3ef52a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
objimpl.h
Include/objimpl.h
+2
-1
gcmodule.c
Modules/gcmodule.c
+9
-0
pylifecycle.c
Python/pylifecycle.c
+3
-3
No files found.
Include/objimpl.h
Dosyayı görüntüle @
fef7e94f
...
...
@@ -224,11 +224,12 @@ PyAPI_FUNC(void) PyObject_SetArenaAllocator(PyObjectArenaAllocator *allocator);
* ==========================
*/
/* C equivalent of gc.collect(). */
/* C equivalent of gc.collect()
which ignores the state of gc.enabled
. */
PyAPI_FUNC
(
Py_ssize_t
)
PyGC_Collect
(
void
);
#ifndef Py_LIMITED_API
PyAPI_FUNC
(
Py_ssize_t
)
_PyGC_CollectNoFail
(
void
);
PyAPI_FUNC
(
Py_ssize_t
)
_PyGC_CollectIfEnabled
(
void
);
#endif
/* Test if a type has a GC head */
...
...
Modules/gcmodule.c
Dosyayı görüntüle @
fef7e94f
...
...
@@ -1596,6 +1596,15 @@ PyGC_Collect(void)
return
n
;
}
Py_ssize_t
_PyGC_CollectIfEnabled
(
void
)
{
if
(
!
enabled
)
return
0
;
return
PyGC_Collect
();
}
Py_ssize_t
_PyGC_CollectNoFail
(
void
)
{
...
...
Python/pylifecycle.c
Dosyayı görüntüle @
fef7e94f
...
...
@@ -600,12 +600,12 @@ Py_FinalizeEx(void)
* XXX but I'm unclear on exactly how that one happens. In any case,
* XXX I haven't seen a real-life report of either of these.
*/
PyGC_Collect
();
_PyGC_CollectIfEnabled
();
#ifdef COUNT_ALLOCS
/* With COUNT_ALLOCS, it helps to run GC multiple times:
each collection might release some types from the type
list, so they become garbage. */
while
(
PyGC_Collect
()
>
0
)
while
(
_PyGC_CollectIfEnabled
()
>
0
)
/* nothing */
;
#endif
/* Destroy all modules */
...
...
@@ -632,7 +632,7 @@ Py_FinalizeEx(void)
* XXX Python code getting called.
*/
#if 0
PyGC_Collect
();
_PyGC_CollectIfEnabled
();
#endif
/* Disable tracemalloc after all Python objects have been destroyed,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment