mirror of
https://github.com/bdwgc/bdwgc-rust.git
synced 2026-10-25 09:23:18 -06:00
06392d229af581b512b57815f9f98fcf7a75a2f0
86bd7c0 to 20f9bcf (#593)
Bumps [bdwgc-alloc-sys/vendor/bdwgc](https://github.com/bdwgc/bdwgc) from `86bd7c0` to `20f9bcf`. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/bdwgc/bdwgc/commit/20f9bcfd5b4d118b32292a81b2506e2b47d76508"><code>20f9bcf</code></a> GH Actions: Execute tests in qemu-user</li> <li><a href="https://github.com/bdwgc/bdwgc/commit/35a2195364cd735a4719a302364066a0530afd5a"><code>35a2195</code></a> Workaround 'unexpected SIGSEGV outside heap' fail on ancient architectures</li> <li><a href="https://github.com/bdwgc/bdwgc/commit/037f85748e5a4168b6469913003449f7389aa4a8"><code>037f857</code></a> GH Actions: Support Hexagon in cmake-qemu.yml</li> <li><a href="https://github.com/bdwgc/bdwgc/commit/8d8d3f0e1312182ccb18bf116543e388946e5968"><code>8d8d3f0</code></a> Fix 'getcontext undefined' link error for Hexagon target</li> <li><a href="https://github.com/bdwgc/bdwgc/commit/718a0fa82b77d0c7b7e75b7a591457fd69cd82c6"><code>718a0fa</code></a> GH Actions: Support e2k in cmake-qemu.yml</li> <li><a href="https://github.com/bdwgc/bdwgc/commit/08e0e9e4aa3480172f407384e95f7cc684d401df"><code>08e0e9e</code></a> GH Actions: Support loongarch64 in cmake-qemu.yml</li> <li><a href="https://github.com/bdwgc/bdwgc/commit/381575d4a6acc1828491da70b90208a2fb763f22"><code>381575d</code></a> GH Actions: Add bootlin-provided toolchains to cmake-qemu.yml</li> <li><a href="https://github.com/bdwgc/bdwgc/commit/f43857555fe47514393dd517af44920f1dd28822"><code>f438575</code></a> GH Actions: Remove apt caching in cmake-qemu.yml</li> <li><a href="https://github.com/bdwgc/bdwgc/commit/a0a3e2e773ac8624fd5301b0e71344465227ef2c"><code>a0a3e2e</code></a> Eliminate 'NIOS2 macro redefined' gcc warning</li> <li><a href="https://github.com/bdwgc/bdwgc/commit/472a380f54a70fa50a35b74186beac5bfecfd556"><code>472a380</code></a> GH Actions: Replace unreliable cache-apt-pkgs with apt install</li> <li>Additional commits viewable in <a href="https://github.com/bdwgc/bdwgc/compare/86bd7c0a5a8b6d4ef9021d27c3a1db6ecd75499c...20f9bcfd5b4d118b32292a81b2506e2b47d76508">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
bdwgc-rust
GlobalAlloc implementation for bdwgc, the conservative garbage collector.
This crate is for use cases in which developers need to integrate bdwgc into their programs written in Rust (e.g. writing a runtime library in Rust for their own programming language whose GC is done by bdwgc.)
The raw bindings to the C API of bdwgc that this crate is built on are available as the bdwgc-alloc-sys crate.
Usage
use bdwgc_alloc::Allocator;
use std::thread::spawn;
#[global_allocator]
static GLOBAL_ALLOCATOR: Allocator = Allocator;
fn main() {
unsafe { Allocator::initialize() }
// Unreachable objects are collected automatically.
Box::leak(Box::new([0u8; 256]));
// Threads other than a main thread must be registered to a collector before allocation.
spawn(|| {
unsafe { Allocator::register_current_thread() }.unwrap();
Box::leak(Box::new([0u8; 256]));
unsafe { Allocator::unregister_current_thread() }
})
.join()
.unwrap();
}
By default bdwgc is built with autotools. To build with cmake, enable the cmake feature:
cargo build --no-default-features --features cmake
License
Languages
Rust
100%