Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions changelog/druntime.tgc.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Opt-in thread-local GC (`tgc`, 0.2.0 prototype)

Select with `--DRT-gcopt=gc:tgc`.

**0.2.0:** working partitioned shared regions with region-scoped collection
(selective thread suspend via `thread_suspendList`), per-heap list locks,
basic array append metadata, and benchmark/test harness.

Region API: `_d_tgc_region_create`, `_d_tgc_region_attach`, `_d_tgc_region_malloc`,
`_d_tgc_region_collect`, `_d_tgc_version`.

Optional: `--DRT-gcopt=gc:tgc tgcShared:symgc` (SymGC shared backend stub for 0.3.0).

Tests: `druntime/test/gc/tgc.d`, `tgc_regions.d`, `tgc_bench.d`.
Benchmarks: `tools/tgc-bench/run-benchmarks.ps1`.
3 changes: 3 additions & 0 deletions druntime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ $(DOC_OUTPUT_DIR)/core_internal_gc_impl_conservative_%.html : import/core/intern
$(DOC_OUTPUT_DIR)/core_internal_gc_impl_manual_%.html : import/core/internal/gc/impl/manual/%.d $(DMD)
$(DMD) $(DDOCFLAGS) -Df$@ project.ddoc $(DOCFMT) $<

$(DOC_OUTPUT_DIR)/core_internal_gc_impl_tgc_%.html : import/core/internal/gc/impl/tgc/%.d $(DMD)
$(DMD) $(DDOCFLAGS) -Df$@ project.ddoc $(DOCFMT) $<

$(DOC_OUTPUT_DIR)/core_internal_gc_impl_proto_%.html : import/core/internal/gc/impl/proto/%.d $(DMD)
$(DMD) $(DDOCFLAGS) -Df$@ project.ddoc $(DOCFMT) $<

Expand Down
1 change: 1 addition & 0 deletions druntime/mak/COPY
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ COPY=\
$(IMPDIR)\core\internal\gc\proxy.d \
$(IMPDIR)\core\internal\gc\impl\conservative\gc.d \
$(IMPDIR)\core\internal\gc\impl\manual\gc.d \
$(IMPDIR)\core\internal\gc\impl\tgc\gc.d \
$(IMPDIR)\core\internal\gc\impl\proto\gc.d \
\
$(IMPDIR)\core\internal\container\array.d \
Expand Down
1 change: 1 addition & 0 deletions druntime/mak/DOCS
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ DOCS=\
$(DOCDIR)\core_internal_gc_proxy.html \
$(DOCDIR)\core_internal_gc_impl_conservative_gc.html \
$(DOCDIR)\core_internal_gc_impl_manual_gc.html \
$(DOCDIR)\core_internal_gc_impl_tgc_gc.html \
$(DOCDIR)\core_internal_gc_impl_proto_gc.html \
\
$(DOCDIR)\rt_aApply.html \
Expand Down
1 change: 1 addition & 0 deletions druntime/mak/SRCS
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ SRCS=\
src\core\internal\gc\proxy.d \
src\core\internal\gc\impl\conservative\gc.d \
src\core\internal\gc\impl\manual\gc.d \
src\core\internal\gc\impl\tgc\gc.d \
src\core\internal\gc\impl\proto\gc.d \
\
src\core\internal\util\array.d \
Expand Down
1 change: 1 addition & 0 deletions druntime/src/core/gc/config.d
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ struct Config
bool fork = false; // optional concurrent behaviour
ubyte profile; // enable profiling with summary when terminating program
string gc = "conservative"; // select gc implementation conservative|precise|manual
string tgcShared = "native"; // tgc shared-region backend: native|symgc (symgc: 0.3.0 stub)

@MemVal size_t initReserve; // initial reserve (bytes)
@MemVal size_t minPoolSize = 1 << 20; // initial and minimum pool size (bytes)
Expand Down
Loading
Loading