CARVIEW |
Select Language
HTTP/2 200
date: Mon, 28 Jul 2025 10:10:21 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/python/cpython.git
etag: W/"2ec2612a022191bd3a9f4c94211c4715"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=EeJCYOI7OQvUYDCpKXciy6coMc3sPRSxbsBAn9g4nateuL26PYtF4LgHeu3eU7ssI4WkiSzjqhxyVxsT%2F3kg%2BZ668bz5E9319m2kxd26szMWKfu4IvN9RR8tKxdvxjwIGTXRrwAI3sz5ai5%2F3MJwdakHu%2FLaNt87FNf0bVHNetwB7uDWNLyYyWsCCfpcB3alzIAzA1kf%2B30N2FAMtwHtmLvNi933xXMds%2BNLM797aKgwBdBv4B3fh555o9sYrHwsN2hu5tlmconDuKe3JFrEzQ%3D%3D--4ue1kHd4ATKoU7Jx--zw29TBEhFckVPz%2B1%2F5hjng%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1145454452.1753697420; Path=/; Domain=github.com; Expires=Tue, 28 Jul 2026 10:10:20 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Tue, 28 Jul 2026 10:10:20 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: BEF8:37D5F1:18E6491:1FF619B:68874C8C
gh-101659: Isolate "obmalloc" State to Each Interpreter (gh-101660) · python/cpython@df3173d · GitHub
Copy file name to clipboardExpand all lines: Include/cpython/initconfig.h
Copy file name to clipboardExpand all lines: Include/internal/pycore_interp.h
Copy file name to clipboardExpand all lines: Include/internal/pycore_obmalloc.h
Copy file name to clipboardExpand all lines: Include/internal/pycore_obmalloc_init.h
Copy file name to clipboardExpand all lines: Include/internal/pycore_pylifecycle.h
Copy file name to clipboardExpand all lines: Include/internal/pycore_pystate.h
Copy file name to clipboardExpand all lines: Include/internal/pycore_runtime.h
Copy file name to clipboardExpand all lines: Include/internal/pycore_runtime_init.h
Copy file name to clipboardExpand all lines: Lib/test/test_capi/test_misc.py
Skip to content
Navigation Menu
{{ message }}
-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Commit df3173d
authored
This is strictly about moving the "obmalloc" runtime state from
`_PyRuntimeState` to `PyInterpreterState`. Doing so improves isolation
between interpreters, specifically most of the memory (incl. objects)
allocated for each interpreter's use. This is important for a
per-interpreter GIL, but such isolation is valuable even without it.
FWIW, a per-interpreter obmalloc is the proverbial
canary-in-the-coalmine when it comes to the isolation of objects between
interpreters. Any object that leaks (unintentionally) to another
interpreter is highly likely to cause a crash (on debug builds at
least). That's a useful thing to know, relative to interpreter
isolation.
1 parent 01be52e commit df3173dCopy full SHA for df3173d
File tree
Expand file treeCollapse file tree
20 files changed
+322
-73
lines changedFilter options
- Include
- cpython
- internal
- Lib/test
- test_capi
- test_import
- Modules
- Objects
- Python
- Tools/c-analyzer/cpython
Expand file treeCollapse file tree
20 files changed
+322
-73
lines changedInclude/cpython/initconfig.h
Copy file name to clipboardExpand all lines: Include/cpython/initconfig.h+4Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
245 | 245 |
| |
246 | 246 |
| |
247 | 247 |
| |
| 248 | + | |
| 249 | + | |
248 | 250 |
| |
249 | 251 |
| |
250 | 252 |
| |
| |||
254 | 256 |
| |
255 | 257 |
| |
256 | 258 |
| |
| 259 | + | |
257 | 260 |
| |
258 | 261 |
| |
259 | 262 |
| |
| |||
263 | 266 |
| |
264 | 267 |
| |
265 | 268 |
| |
| 269 | + | |
266 | 270 |
| |
267 | 271 |
| |
268 | 272 |
| |
|
+4Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 |
| |
15 | 19 |
| |
16 | 20 |
| |
|
Include/internal/pycore_interp.h
Copy file name to clipboardExpand all lines: Include/internal/pycore_interp.h+4-1Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| 26 | + | |
26 | 27 |
| |
27 | 28 |
| |
28 | 29 |
| |
29 |
| - | |
30 | 30 |
| |
| 31 | + | |
31 | 32 |
| |
32 | 33 |
| |
33 | 34 |
| |
| |||
82 | 83 |
| |
83 | 84 |
| |
84 | 85 |
| |
| 86 | + | |
| 87 | + | |
85 | 88 |
| |
86 | 89 |
| |
87 | 90 |
| |
|
Include/internal/pycore_obmalloc.h
Copy file name to clipboardExpand all lines: Include/internal/pycore_obmalloc.h+10-2Lines changed: 10 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
657 | 657 |
| |
658 | 658 |
| |
659 | 659 |
| |
660 |
| - | |
| 660 | + | |
661 | 661 |
| |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
662 | 666 |
| |
663 | 667 |
| |
664 | 668 |
| |
| |||
675 | 679 |
| |
676 | 680 |
| |
677 | 681 |
| |
678 |
| - | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
679 | 687 |
| |
680 | 688 |
| |
681 | 689 |
| |
|
Include/internal/pycore_obmalloc_init.h
Copy file name to clipboardExpand all lines: Include/internal/pycore_obmalloc_init.h+5-1Lines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
57 |
| - | |
| 57 | + | |
58 | 58 |
| |
59 | 59 |
| |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
60 | 64 |
| |
61 | 65 |
| |
62 | 66 |
| |
|
Include/internal/pycore_pylifecycle.h
Copy file name to clipboardExpand all lines: Include/internal/pycore_pylifecycle.h+1Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
| 67 | + | |
67 | 68 |
| |
68 | 69 |
| |
69 | 70 |
| |
|
Include/internal/pycore_pystate.h
Copy file name to clipboardExpand all lines: Include/internal/pycore_pystate.h+7Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
36 | 43 |
| |
37 | 44 |
| |
38 | 45 |
| |
|
Include/internal/pycore_runtime.h
Copy file name to clipboardExpand all lines: Include/internal/pycore_runtime.h+1-2Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 |
| - | |
25 | 24 |
| |
26 | 25 |
| |
27 | 26 |
| |
| |||
88 | 87 |
| |
89 | 88 |
| |
90 | 89 |
| |
91 |
| - | |
| 90 | + | |
92 | 91 |
| |
93 | 92 |
| |
94 | 93 |
| |
|
Include/internal/pycore_runtime_init.h
Copy file name to clipboardExpand all lines: Include/internal/pycore_runtime_init.h+2-1Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 |
| - | |
| 32 | + | |
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| |||
93 | 93 |
| |
94 | 94 |
| |
95 | 95 |
| |
| 96 | + | |
96 | 97 |
| |
97 | 98 |
| |
98 | 99 |
| |
|
Lib/test/test_capi/test_misc.py
Copy file name to clipboardExpand all lines: Lib/test/test_capi/test_misc.py+27-6Lines changed: 27 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1211 | 1211 |
| |
1212 | 1212 |
| |
1213 | 1213 |
| |
| 1214 | + | |
1214 | 1215 |
| |
1215 | 1216 |
| |
1216 | 1217 |
| |
1217 | 1218 |
| |
1218 | 1219 |
| |
1219 | 1220 |
| |
1220 |
| - | |
| 1221 | + | |
| 1222 | + | |
1221 | 1223 |
| |
| 1224 | + | |
1222 | 1225 |
| |
| 1226 | + | |
| 1227 | + | |
1223 | 1228 |
| |
1224 |
| - | |
1225 |
| - | |
1226 |
| - | |
1227 |
| - | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
1228 | 1233 |
| |
1229 | 1234 |
| |
1230 | 1235 |
| |
| |||
1246 | 1251 |
| |
1247 | 1252 |
| |
1248 | 1253 |
| |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
1249 | 1268 |
| |
1250 | 1269 |
| |
1251 | 1270 |
| |
| |||
1257 | 1276 |
| |
1258 | 1277 |
| |
1259 | 1278 |
| |
| 1279 | + | |
1260 | 1280 |
| |
1261 | 1281 |
| |
1262 | 1282 |
| |
1263 | 1283 |
| |
1264 | 1284 |
| |
1265 |
| - | |
| 1285 | + | |
1266 | 1286 |
| |
| 1287 | + | |
1267 | 1288 |
| |
1268 | 1289 |
| |
1269 | 1290 |
| |
|
You can’t perform that action at this time.
0 commit comments