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
08facd20
Kaydet (Commit)
08facd20
authored
Kas 24, 2013
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #19741: cleanup tracemalloc_realloc()
Explain that unhandled error case is very unlikely
üst
fc91285c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
_tracemalloc.c
Modules/_tracemalloc.c
+15
-8
No files found.
Modules/_tracemalloc.c
Dosyayı görüntüle @
08facd20
...
@@ -563,20 +563,27 @@ tracemalloc_realloc(void *ctx, void *ptr, size_t new_size, int gil_held)
...
@@ -563,20 +563,27 @@ tracemalloc_realloc(void *ctx, void *ptr, size_t new_size, int gil_held)
ptr2
=
alloc
->
realloc
(
alloc
->
ctx
,
ptr
,
new_size
);
ptr2
=
alloc
->
realloc
(
alloc
->
ctx
,
ptr
,
new_size
);
if
(
ptr2
!=
NULL
)
{
if
(
ptr2
!=
NULL
)
{
if
(
ptr
!=
NULL
)
if
(
ptr
!=
NULL
)
{
/* resize */
tracemalloc_log_free
(
ptr
);
tracemalloc_log_free
(
ptr
);
if
(
tracemalloc_log_alloc
(
ptr2
,
new_size
)
<
0
)
{
if
(
tracemalloc_log_alloc
(
ptr2
,
new_size
)
<
0
)
{
if
(
ptr
==
NULL
)
{
/* Memory allocation failed. The error cannot be reported to
the caller, because realloc() may already have shrinked the
memory block and so removed bytes.
This case is very unlikely since we just released an hash
entry, so we have enough free bytes to allocate the new
entry. */
}
}
else
{
/* new allocation */
if
(
tracemalloc_log_alloc
(
ptr2
,
new_size
)
<
0
)
{
/* Memory allocation failed */
/* Memory allocation failed */
alloc
->
free
(
alloc
->
ctx
,
ptr2
);
alloc
->
free
(
alloc
->
ctx
,
ptr2
);
ptr2
=
NULL
;
ptr2
=
NULL
;
}
}
else
{
/* Memory allocation failed. The error cannot be reported to
the caller, because realloc() may already have shrinked the
memory block and so removed bytes. */
}
}
}
}
}
set_reentrant
(
0
);
set_reentrant
(
0
);
...
...
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