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
b90304ac
Kaydet (Commit)
b90304ac
authored
Ock 07, 2009
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #4850: Change COUNT_ALLOCS variables to Py_ssize_t.
üst
e6dc5312
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
12 deletions
+20
-12
NEWS
Misc/NEWS
+2
-0
intobject.c
Objects/intobject.c
+2
-1
object.c
Objects/object.c
+13
-8
stringobject.c
Objects/stringobject.c
+1
-1
tupleobject.c
Objects/tupleobject.c
+2
-2
No files found.
Misc/NEWS
Dosyayı görüntüle @
b90304ac
...
...
@@ -12,6 +12,8 @@ What's New in Python 2.7 alpha 1
Core and Builtins
-----------------
- Issue #4850: Change COUNT_ALLOCS variables to Py_ssize_t.
- Issue #1180193: When importing a module from a .pyc (or .pyo) file with
an existing .py counterpart, override the co_filename attributes of all
code objects if the original filename is obsolete (which can happen if the
...
...
Objects/intobject.c
Dosyayı görüntüle @
b90304ac
...
...
@@ -78,7 +78,8 @@ fill_free_list(void)
static
PyIntObject
*
small_ints
[
NSMALLNEGINTS
+
NSMALLPOSINTS
];
#endif
#ifdef COUNT_ALLOCS
int
quick_int_allocs
,
quick_neg_int_allocs
;
Py_ssize_t
quick_int_allocs
;
Py_ssize_t
quick_neg_int_allocs
;
#endif
PyObject
*
...
...
Objects/object.c
Dosyayı görüntüle @
b90304ac
...
...
@@ -81,24 +81,29 @@ static PyTypeObject *type_list;
garbage itself. If unlist_types_without_objects
is set, they will be removed from the type_list
once the last object is deallocated. */
int
unlist_types_without_objects
;
extern
in
t
tuple_zero_allocs
,
fast_tuple_allocs
;
extern
in
t
quick_int_allocs
,
quick_neg_int_allocs
;
extern
in
t
null_strings
,
one_strings
;
static
int
unlist_types_without_objects
;
extern
Py_ssize_
t
tuple_zero_allocs
,
fast_tuple_allocs
;
extern
Py_ssize_
t
quick_int_allocs
,
quick_neg_int_allocs
;
extern
Py_ssize_
t
null_strings
,
one_strings
;
void
dump_counts
(
FILE
*
f
)
{
PyTypeObject
*
tp
;
for
(
tp
=
type_list
;
tp
;
tp
=
tp
->
tp_next
)
fprintf
(
f
,
"%s alloc'd: %d, freed: %d, max in use: %d
\n
"
,
fprintf
(
f
,
"%s alloc'd: %"
PY_FORMAT_SIZE_T
"d, "
"freed: %"
PY_FORMAT_SIZE_T
"d, "
"max in use: %"
PY_FORMAT_SIZE_T
"d
\n
"
,
tp
->
tp_name
,
tp
->
tp_allocs
,
tp
->
tp_frees
,
tp
->
tp_maxalloc
);
fprintf
(
f
,
"fast tuple allocs: %d, empty: %d
\n
"
,
fprintf
(
f
,
"fast tuple allocs: %"
PY_FORMAT_SIZE_T
"d, "
"empty: %"
PY_FORMAT_SIZE_T
"d
\n
"
,
fast_tuple_allocs
,
tuple_zero_allocs
);
fprintf
(
f
,
"fast int allocs: pos: %d, neg: %d
\n
"
,
fprintf
(
f
,
"fast int allocs: pos: %"
PY_FORMAT_SIZE_T
"d, "
"neg: %"
PY_FORMAT_SIZE_T
"d
\n
"
,
quick_int_allocs
,
quick_neg_int_allocs
);
fprintf
(
f
,
"null strings: %d, 1-strings: %d
\n
"
,
fprintf
(
f
,
"null strings: %"
PY_FORMAT_SIZE_T
"d, "
"1-strings: %"
PY_FORMAT_SIZE_T
"d
\n
"
,
null_strings
,
one_strings
);
}
...
...
Objects/stringobject.c
Dosyayı görüntüle @
b90304ac
...
...
@@ -7,7 +7,7 @@
#include <stddef.h>
#ifdef COUNT_ALLOCS
in
t
null_strings
,
one_strings
;
Py_ssize_
t
null_strings
,
one_strings
;
#endif
static
PyStringObject
*
characters
[
UCHAR_MAX
+
1
];
...
...
Objects/tupleobject.c
Dosyayı görüntüle @
b90304ac
...
...
@@ -19,8 +19,8 @@ static PyTupleObject *free_list[PyTuple_MAXSAVESIZE];
static
int
numfree
[
PyTuple_MAXSAVESIZE
];
#endif
#ifdef COUNT_ALLOCS
in
t
fast_tuple_allocs
;
in
t
tuple_zero_allocs
;
Py_ssize_
t
fast_tuple_allocs
;
Py_ssize_
t
tuple_zero_allocs
;
#endif
PyObject
*
...
...
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