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
5d4b09c1
Kaydet (Commit)
5d4b09c1
authored
Eyl 19, 2016
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
correct silly spelling problem
üst
19517e4d
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 @
5d4b09c1
...
...
@@ -760,7 +760,7 @@ struct arena_object {
* here to mark an arena_object that doesn't correspond to an
* allocated arena.
*/
uinptr_t
address
;
uin
t
ptr_t
address
;
/* Pool-aligned pointer to the next pool to be carved off. */
block
*
pool_address
;
...
...
@@ -1091,7 +1091,7 @@ new_arena(void)
unused_arena_objects
=
arenaobj
;
return
NULL
;
}
arenaobj
->
address
=
(
uinptr_t
)
address
;
arenaobj
->
address
=
(
uin
t
ptr_t
)
address
;
++
narenas_currently_allocated
;
++
ntimes_arena_allocated
;
...
...
@@ -1198,7 +1198,7 @@ address_in_range(void *p, poolp pool)
// only once.
uint
arenaindex
=
*
((
volatile
uint
*
)
&
pool
->
arenaindex
);
return
arenaindex
<
maxarenas
&&
(
uinptr_t
)
p
-
arenas
[
arenaindex
].
address
<
ARENA_SIZE
&&
(
uin
t
ptr_t
)
p
-
arenas
[
arenaindex
].
address
<
ARENA_SIZE
&&
arenas
[
arenaindex
].
address
!=
0
;
}
...
...
@@ -2287,25 +2287,25 @@ _PyObject_DebugMallocStats(FILE *out)
*/
for
(
i
=
0
;
i
<
maxarenas
;
++
i
)
{
uint
j
;
uinptr_t
base
=
arenas
[
i
].
address
;
uin
t
ptr_t
base
=
arenas
[
i
].
address
;
/* Skip arenas which are not allocated. */
if
(
arenas
[
i
].
address
==
(
uinptr_t
)
NULL
)
if
(
arenas
[
i
].
address
==
(
uin
t
ptr_t
)
NULL
)
continue
;
narenas
+=
1
;
numfreepools
+=
arenas
[
i
].
nfreepools
;
/* round up to pool alignment */
if
(
base
&
(
uinptr_t
)
POOL_SIZE_MASK
)
{
if
(
base
&
(
uin
t
ptr_t
)
POOL_SIZE_MASK
)
{
arena_alignment
+=
POOL_SIZE
;
base
&=
~
(
uinptr_t
)
POOL_SIZE_MASK
;
base
&=
~
(
uin
t
ptr_t
)
POOL_SIZE_MASK
;
base
+=
POOL_SIZE
;
}
/* visit every pool in the arena */
assert
(
base
<=
(
uinptr_t
)
arenas
[
i
].
pool_address
);
for
(
j
=
0
;
base
<
(
uinptr_t
)
arenas
[
i
].
pool_address
;
assert
(
base
<=
(
uin
t
ptr_t
)
arenas
[
i
].
pool_address
);
for
(
j
=
0
;
base
<
(
uin
t
ptr_t
)
arenas
[
i
].
pool_address
;
++
j
,
base
+=
POOL_SIZE
)
{
poolp
p
=
(
poolp
)
base
;
const
uint
sz
=
p
->
szidx
;
...
...
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