Commit 7ef2e30
committed
gh-133136: Limit excess memory held by QSBR
The free threading build uses QSBR to delay the freeing of dictionary
keys and list arrays when the objects are accessed by multiple threads
in order to allow concurrent reads to proceeed with holding the object
lock. The requests are processed in batches to reduce execution
overhead, but for large memory blocks this can lead to excess memory
usage.
Take into account the size of the memory block when deciding when to
process QSBR requests.1 parent 1ffe913 commit 7ef2e30
File tree
7 files changed
+44
-12
lines changed- Include/internal
- Misc/NEWS.d/next/Core_and_Builtins
- Objects
7 files changed
+44
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3350 | 3350 | | |
3351 | 3351 | | |
3352 | 3352 | | |
3353 | | - | |
| 3353 | + | |
3354 | 3354 | | |
3355 | 3355 | | |
3356 | 3356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
813 | 813 | | |
814 | 814 | | |
815 | 815 | | |
816 | | - | |
| 816 | + | |
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
| |||
858 | 858 | | |
859 | 859 | | |
860 | 860 | | |
861 | | - | |
| 861 | + | |
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1141 | 1141 | | |
1142 | 1142 | | |
1143 | 1143 | | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1144 | 1163 | | |
1145 | | - | |
| 1164 | + | |
1146 | 1165 | | |
1147 | 1166 | | |
1148 | 1167 | | |
| |||
1200 | 1219 | | |
1201 | 1220 | | |
1202 | 1221 | | |
1203 | | - | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
1204 | 1230 | | |
1205 | 1231 | | |
1206 | 1232 | | |
1207 | | - | |
1208 | | - | |
| 1233 | + | |
1209 | 1234 | | |
1210 | 1235 | | |
1211 | 1236 | | |
1212 | 1237 | | |
1213 | 1238 | | |
1214 | 1239 | | |
1215 | | - | |
| 1240 | + | |
1216 | 1241 | | |
1217 | 1242 | | |
1218 | 1243 | | |
1219 | | - | |
| 1244 | + | |
1220 | 1245 | | |
1221 | 1246 | | |
1222 | 1247 | | |
| |||
1226 | 1251 | | |
1227 | 1252 | | |
1228 | 1253 | | |
1229 | | - | |
| 1254 | + | |
1230 | 1255 | | |
1231 | 1256 | | |
1232 | 1257 | | |
| |||
0 commit comments