Commit e3e8725
committed
Fix issue where a new GC could be started during a GC
[Bug #21548]
In lazy sweeping, if we need to allocate an object in a heap where we
weren't able to free any slots, but we also either have empty pages or
could allocate new pages, then we want to preemptively claim a page
because it's possible that sweeping another heap will call gc_sweep_finish_heap,
which may use up all of the empty/allocatable pages. If other heaps are
not finished sweeping then we do not finish this GC and we will end up
triggering a new GC cycle during this GC phase.1 parent 34cca18 commit e3e8725
1 file changed
+25
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2052 | 2052 | | |
2053 | 2053 | | |
2054 | 2054 | | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
2055 | 2058 | | |
2056 | 2059 | | |
2057 | 2060 | | |
| |||
3930 | 3933 | | |
3931 | 3934 | | |
3932 | 3935 | | |
3933 | | - | |
3934 | | - | |
3935 | | - | |
3936 | | - | |
3937 | | - | |
| 3936 | + | |
| 3937 | + | |
| 3938 | + | |
| 3939 | + | |
| 3940 | + | |
| 3941 | + | |
| 3942 | + | |
| 3943 | + | |
| 3944 | + | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
| 3949 | + | |
| 3950 | + | |
| 3951 | + | |
| 3952 | + | |
| 3953 | + | |
| 3954 | + | |
| 3955 | + | |
| 3956 | + | |
| 3957 | + | |
3938 | 3958 | | |
3939 | 3959 | | |
3940 | 3960 | | |
| |||
0 commit comments