Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API for retrieving finaliser counts #118

Merged
merged 1 commit into from
May 9, 2024
Merged
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
2 changes: 2 additions & 0 deletions library/bdwgc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,6 @@ extern "C" {
pub fn GC_init_tls_rootset(rootset: *mut u8);

pub fn GC_ignore_warn_proc(proc: *mut u8, word: usize);

pub fn GC_finalized_total() -> u64;
}
3 changes: 3 additions & 0 deletions library/std/src/gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ impl GcAllocator {
////////////////////////////////////////////////////////////////////////////////
// Free functions
////////////////////////////////////////////////////////////////////////////////
pub fn finalized_total() -> u64 {
unsafe { bdwgc::GC_finalized_total() }
}

pub fn init() {
unsafe { bdwgc::GC_set_markers_count(1) }
Expand Down
2 changes: 1 addition & 1 deletion src/bdwgc
Submodule bdwgc updated 92 files
+46 −55 .appveyor.yml
+35 −0 .github/workflows/CodeQL.yml
+114 −0 .github/workflows/cmake-build.yml
+117 −0 .github/workflows/zig-build.yml
+157 −0 .github/workflows/zig-cross-compile.yml
+5 −0 .gitignore
+101 −34 .travis.yml
+10 −0 AUTHORS
+51 −41 CMakeLists.txt
+126 −7 ChangeLog
+24 −25 Makefile.am
+20 −18 Makefile.direct
+2 −2 NT_MAKEFILE
+125 −73 README.md
+25 −25 WCC_MAKEFILE
+193 −141 allchblk.c
+143 −118 alloc.c
+9 −0 autogen.sh
+47 −33 backgraph.c
+7 −7 blacklst.c
+717 −0 build.zig
+30 −31 checksums.c
+12 −11 configure.ac
+1 −1 cord/cord.am
+14 −12 cord/cordbscs.c
+4 −1 cord/cordprnt.c
+18 −2 cord/cordxtra.c
+12 −4 cord/tests/cordtest.c
+4 −1 cord/tests/de.c
+3 −3 cord/tests/de_win.c
+12 −6 darwin_stop_world.c
+139 −168 dbg_mlc.c
+6 −5 docs/README.environment
+21 −7 docs/README.macros
+2 −2 docs/finalization.md
+14 −14 docs/gcdescr.md
+37 −30 docs/leak.md
+1 −1 docs/platforms/README.solaris2
+2 −2 docs/platforms/README.win32
+6 −5 docs/porting.md
+262 −252 dyn_load.c
+2 −2 extra/AmigaOS.c
+1 −1 extra/msvc_dbg.c
+1 −1 extra/symbian.cpp
+33 −33 finalize.c
+59 −2 fnlz_mlc.c
+11 −12 gcj_mlc.c
+42 −49 headers.c
+76 −27 include/gc/gc.h
+80 −63 include/gc/gc_allocator.h
+8 −0 include/gc/gc_config_macros.h
+8 −0 include/gc/gc_disclaim.h
+67 −49 include/gc/gc_inline.h
+18 −11 include/gc/gc_mark.h
+4 −3 include/gc/gc_tiny_fl.h
+1 −1 include/gc/leak_detector.h
+24 −12 include/private/dbg_mlc.h
+5 −5 include/private/gc_atomic_ops.h
+11 −14 include/private/gc_hdrs.h
+24 −39 include/private/gc_pmark.h
+359 −212 include/private/gc_priv.h
+92 −76 include/private/gcconfig.h
+11 −6 include/private/pthread_support.h
+6 −7 include/private/specific.h
+21 −53 mach_dep.c
+110 −85 malloc.c
+60 −94 mallocx.c
+318 −318 mark.c
+133 −125 mark_rts.c
+248 −181 misc.c
+17 −30 new_hblk.c
+7 −9 obj_map.c
+690 −499 os_dep.c
+2 −2 pthread_start.c
+12 −27 pthread_stop_world.c
+121 −77 pthread_support.c
+49 −80 ptr_chck.c
+155 −134 reclaim.c
+5 −5 specific.c
+12 −8 tests/cpp.cc
+6 −0 tests/disclaim.c
+1 −1 tests/disclaim_bench.c
+188 −115 tests/gctest.c
+13 −12 tests/huge.c
+6 −2 tests/subthreadcreate.c
+9 −5 tests/threadkey.c
+30 −28 tests/weakmap.c
+42 −45 thread_local_alloc.c
+1 −1 tools/if_not_there.c
+4 −3 tools/setjmp_t.c
+33 −38 typd_mlc.c
+43 −41 win32_threads.c