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
cd83fa8c
Kaydet (Commit)
cd83fa8c
authored
Haz 27, 2013
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #13483: Use VirtualAlloc in obmalloc on Windows.
üst
fe3ae3cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
NEWS
Misc/NEWS
+2
-0
obmalloc.c
Objects/obmalloc.c
+12
-2
No files found.
Misc/NEWS
Dosyayı görüntüle @
cd83fa8c
...
@@ -10,6 +10,8 @@ What's New in Python 3.4.0 Alpha 1?
...
@@ -10,6 +10,8 @@ What's New in Python 3.4.0 Alpha 1?
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #13483: Use VirtualAlloc in obmalloc on Windows.
- Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raise
- Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raise
OverflowError when an argument of %c format is out of range.
OverflowError when an argument of %c format is out of range.
...
...
Objects/obmalloc.c
Dosyayı görüntüle @
cd83fa8c
...
@@ -9,6 +9,10 @@
...
@@ -9,6 +9,10 @@
#endif
#endif
#endif
#endif
#ifdef MS_WINDOWS
#include <windows.h>
#endif
#ifdef WITH_VALGRIND
#ifdef WITH_VALGRIND
#include <valgrind/valgrind.h>
#include <valgrind/valgrind.h>
...
@@ -598,7 +602,11 @@ new_arena(void)
...
@@ -598,7 +602,11 @@ new_arena(void)
arenaobj
=
unused_arena_objects
;
arenaobj
=
unused_arena_objects
;
unused_arena_objects
=
arenaobj
->
nextarena
;
unused_arena_objects
=
arenaobj
->
nextarena
;
assert
(
arenaobj
->
address
==
0
);
assert
(
arenaobj
->
address
==
0
);
#ifdef ARENAS_USE_MMAP
#ifdef MS_WINDOWS
address
=
(
void
*
)
VirtualAlloc
(
NULL
,
ARENA_SIZE
,
MEM_COMMIT
|
MEM_RESERVE
,
PAGE_READWRITE
);
err
=
(
address
==
NULL
);
#elif defined(ARENAS_USE_MMAP)
address
=
mmap
(
NULL
,
ARENA_SIZE
,
PROT_READ
|
PROT_WRITE
,
address
=
mmap
(
NULL
,
ARENA_SIZE
,
PROT_READ
|
PROT_WRITE
,
MAP_PRIVATE
|
MAP_ANONYMOUS
,
-
1
,
0
);
MAP_PRIVATE
|
MAP_ANONYMOUS
,
-
1
,
0
);
err
=
(
address
==
MAP_FAILED
);
err
=
(
address
==
MAP_FAILED
);
...
@@ -1093,7 +1101,9 @@ PyObject_Free(void *p)
...
@@ -1093,7 +1101,9 @@ PyObject_Free(void *p)
unused_arena_objects
=
ao
;
unused_arena_objects
=
ao
;
/* Free the entire arena. */
/* Free the entire arena. */
#ifdef ARENAS_USE_MMAP
#ifdef MS_WINDOWS
VirtualFree
((
void
*
)
ao
->
address
,
0
,
MEM_RELEASE
);
#elif defined(ARENAS_USE_MMAP)
munmap
((
void
*
)
ao
->
address
,
ARENA_SIZE
);
munmap
((
void
*
)
ao
->
address
,
ARENA_SIZE
);
#else
#else
free
((
void
*
)
ao
->
address
);
free
((
void
*
)
ao
->
address
);
...
...
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