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
735bb12b
Kaydet (Commit)
735bb12b
authored
Kas 26, 2010
tarafından
Stefan Krah
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Indentation cleanup.
üst
67f953c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
obmalloc.c
Objects/obmalloc.c
+9
-9
No files found.
Objects/obmalloc.c
Dosyayı görüntüle @
735bb12b
...
...
@@ -249,7 +249,7 @@ typedef uchar block;
/* Pool for small blocks. */
struct
pool_header
{
union
{
block
*
_padding
;
uint
count
;
}
ref
;
/* number of allocated blocks */
uint
count
;
}
ref
;
/* number of allocated blocks */
block
*
freeblock
;
/* pool's free list head */
struct
pool_header
*
nextpool
;
/* next pool of this size class */
struct
pool_header
*
prevpool
;
/* previous pool "" */
...
...
@@ -404,7 +404,7 @@ compensating for that a pool_header's nextpool and prevpool members
immediately follow a pool_header's first two members:
union { block *_padding;
uint count; } ref;
uint count; } ref;
block *freeblock;
each of which consume sizeof(block *) bytes. So what usedpools[i+i] really
...
...
@@ -709,7 +709,7 @@ extremely desirable that it be this fast.
#undef Py_ADDRESS_IN_RANGE
#if defined(__GNUC__) && ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1) || \
(__GNUC__ >= 4))
(__GNUC__ >= 4))
#define Py_NO_INLINE __attribute__((__noinline__))
#else
#define Py_NO_INLINE
...
...
@@ -1514,7 +1514,7 @@ _PyObject_DebugReallocApi(char api, void *p, size_t nbytes)
if
(
nbytes
>
original_nbytes
)
{
/* growing: mark new extra memory clean */
memset
(
q
+
original_nbytes
,
CLEANBYTE
,
nbytes
-
original_nbytes
);
nbytes
-
original_nbytes
);
}
return
q
;
...
...
@@ -1641,11 +1641,11 @@ _PyObject_DebugDumpAddress(const void *p)
fputs
(
"FORBIDDENBYTE, as expected.
\n
"
,
stderr
);
else
{
fprintf
(
stderr
,
"not all FORBIDDENBYTE (0x%02x):
\n
"
,
FORBIDDENBYTE
);
FORBIDDENBYTE
);
for
(
i
=
0
;
i
<
SST
;
++
i
)
{
const
uchar
byte
=
tail
[
i
];
fprintf
(
stderr
,
" at tail+%d: 0x%02x"
,
i
,
byte
);
i
,
byte
);
if
(
byte
!=
FORBIDDENBYTE
)
fputs
(
" *** OUCH"
,
stderr
);
fputc
(
'\n'
,
stderr
);
...
...
@@ -1751,7 +1751,7 @@ _PyObject_DebugMallocStats(void)
char
buf
[
128
];
fprintf
(
stderr
,
"Small block threshold = %d, in %u size classes.
\n
"
,
SMALL_REQUEST_THRESHOLD
,
numclasses
);
SMALL_REQUEST_THRESHOLD
,
numclasses
);
for
(
i
=
0
;
i
<
numclasses
;
++
i
)
numpools
[
i
]
=
numblocks
[
i
]
=
numfreeblocks
[
i
]
=
0
;
...
...
@@ -1809,7 +1809,7 @@ _PyObject_DebugMallocStats(void)
fputc
(
'\n'
,
stderr
);
fputs
(
"class size num pools blocks in use avail blocks
\n
"
"----- ---- --------- ------------- ------------
\n
"
,
stderr
);
stderr
);
for
(
i
=
0
;
i
<
numclasses
;
++
i
)
{
size_t
p
=
numpools
[
i
];
...
...
@@ -1824,7 +1824,7 @@ _PyObject_DebugMallocStats(void)
"%11"
PY_FORMAT_SIZE_T
"u "
"%15"
PY_FORMAT_SIZE_T
"u "
"%13"
PY_FORMAT_SIZE_T
"u
\n
"
,
i
,
size
,
p
,
b
,
f
);
i
,
size
,
p
,
b
,
f
);
allocated_bytes
+=
b
*
size
;
available_bytes
+=
f
*
size
;
pool_header_bytes
+=
p
*
POOL_OVERHEAD
;
...
...
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