Optimize garbage collection with a generational GC#2129
Conversation
2cbb989 to
5203eaf
Compare
|
per Amp:
|
2a1dab6 to
554c7f5
Compare
|
I'm just the messenger.. per amp:
|
|
Codex verified, but was NOT satisfied by one line fix:
|
554c7f5 to
611ae42
Compare
|
I removed the defensive block that would process pointers from old -> young, which cannot exist as Erlang data structures are immutable. This confused the LLMs. |
You know best, this is way beyond my skill level - llm does suggest cleaning docs up if you back that out.. |
611ae42 to
4d58b57
Compare
4191e7d to
8a8f998
Compare
8a8f998 to
c881d09
Compare
d377b55 to
1dd8ed6
Compare
f289efe to
74158b9
Compare
71e90c0 to
71da9bc
Compare
3c35158 to
cb19ec3
Compare
de08cad to
359bfeb
Compare
58fc930 to
9d34e8a
Compare
Only the value may be written; the key already in the tuple is kept. Fix both the emulator and the JIT lowering, with a regression test that exercises promotion via allocation-driven minor collections. Signed-off-by: Paul Guyot <pguyot@kallisys.net>
A process that exited before ever being scheduled was still in the waiting_processes list when context_destroy ran, leaving a dangling list entry. Remove it from the list under the processes spinlock. Signed-off-by: Paul Guyot <pguyot@kallisys.net>
Semantics follow BEAM: a per-process fullsweep_after counter, settable with spawn_opt/1 and process_flag/2 (spec fixed accordingly), defaulting to 65535 like BEAM. Minor collections run in between; 0 disables the generational collector (always full-sweep). Signed-off-by: Paul Guyot <pguyot@kallisys.net>
9d34e8a to
ba145d4
Compare
Continuation of:
Semantics follow BEAM: a per-process
fullsweep_aftercounter, settable withspawn_opt/1andprocess_flag/2(spec fixed accordingly), defaulting to 65535 like BEAM.0disables the generational collector (always full-sweep).The first two commits are independent fixes that the generational collector exposes or depends on, reviewable separately:
put_map_exactwrote the key operand into the shared keys tuple, a pre-existing bug masked by full-sweep GC, exposed by any sharing-preserving collectorwaiting_processeslist incontext_destroyThese changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later