forked from GitHub/bdwgc-rust
Compare commits
4 Commits
v0.6.8
...
chore/poin
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e11647fab9 | ||
|
|
08d549315b | ||
|
|
a4bcbf2c7b | ||
|
|
5f41a2b8e2 |
@@ -3,7 +3,6 @@
|
|||||||
"autogen",
|
"autogen",
|
||||||
"autotools",
|
"autotools",
|
||||||
"bdwgc",
|
"bdwgc",
|
||||||
"canonicalize",
|
|
||||||
"cflag",
|
"cflag",
|
||||||
"dealloc",
|
"dealloc",
|
||||||
"finalizer",
|
"finalizer",
|
||||||
|
|||||||
11
.github/mergify.yml
vendored
Normal file
11
.github/mergify.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
pull_request_rules:
|
||||||
|
- name: dependabot
|
||||||
|
conditions:
|
||||||
|
- author=dependabot[bot]
|
||||||
|
actions:
|
||||||
|
queue:
|
||||||
|
name: default
|
||||||
|
method: squash
|
||||||
|
queue_rules:
|
||||||
|
- name: default
|
||||||
|
conditions: []
|
||||||
13
.github/workflows/dependabot.yaml
vendored
13
.github/workflows/dependabot.yaml
vendored
@@ -1,13 +0,0 @@
|
|||||||
name: dependabot
|
|
||||||
on: pull_request
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
jobs:
|
|
||||||
merge:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.actor == 'dependabot[bot]'
|
|
||||||
steps:
|
|
||||||
- run: gh pr merge --auto --squash ${{ github.event.pull_request.html_url }}
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "bdwgc-alloc"
|
name = "bdwgc-alloc"
|
||||||
description = "impl GlobalAlloc for bdwgc"
|
description = "impl GlobalAlloc for bdwgc"
|
||||||
version = "0.6.8"
|
version = "0.6.7"
|
||||||
authors = [
|
authors = [
|
||||||
"swgillespie <sean.william.g@gmail.com>",
|
"swgillespie <sean.william.g@gmail.com>",
|
||||||
"Yota Toyama <raviqqe@gmail.com>",
|
"Yota Toyama <raviqqe@gmail.com>",
|
||||||
|
|||||||
8
build.rs
8
build.rs
@@ -23,8 +23,7 @@ fn main() {
|
|||||||
|
|
||||||
let dst = autotools::Config::new(LIB_GC_DIR)
|
let dst = autotools::Config::new(LIB_GC_DIR)
|
||||||
.cflag(format!(
|
.cflag(format!(
|
||||||
// spell-checker: disable-next-line
|
"-I{} -L/lib/x86_64-linux-gnu -lpthread -fPIC -D POINTER_MASK=0x7",
|
||||||
"-I{} -L/lib/x86_64-linux-gnu -lpthread -fPIC",
|
|
||||||
dst.join("include").display()
|
dst.join("include").display()
|
||||||
))
|
))
|
||||||
.build();
|
.build();
|
||||||
@@ -60,7 +59,10 @@ fn main() {
|
|||||||
let dst = Config::new(LIB_GC_DIR)
|
let dst = Config::new(LIB_GC_DIR)
|
||||||
.profile("Release")
|
.profile("Release")
|
||||||
.define("BUILD_SHARED_LIBS", "FALSE")
|
.define("BUILD_SHARED_LIBS", "FALSE")
|
||||||
.cflag(format!("-I{}", libatomic_include_path))
|
.cflag(format!(
|
||||||
|
"-I{} -DPOINTER_MASK=0x7",
|
||||||
|
libatomic_include_path, foo
|
||||||
|
))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
println!(
|
println!(
|
||||||
|
|||||||
1
rust-toolchain
Normal file
1
rust-toolchain
Normal file
@@ -0,0 +1 @@
|
|||||||
|
stable
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
[toolchain]
|
|
||||||
channel = "stable"
|
|
||||||
components = ["clippy", "rustfmt", "rust-analyzer", "rust-src"]
|
|
||||||
@@ -25,6 +25,7 @@ extern "C" {
|
|||||||
fn GC_get_stack_base(stack_base: *mut GcStackBase) -> c_int;
|
fn GC_get_stack_base(stack_base: *mut GcStackBase) -> c_int;
|
||||||
fn GC_init();
|
fn GC_init();
|
||||||
fn GC_malloc(size: size_t) -> *mut c_void;
|
fn GC_malloc(size: size_t) -> *mut c_void;
|
||||||
|
fn GC_memalign(align: size_t, size: size_t) -> *mut c_void;
|
||||||
fn GC_realloc(ptr: *mut c_void, size: size_t) -> *mut c_void;
|
fn GC_realloc(ptr: *mut c_void, size: size_t) -> *mut c_void;
|
||||||
fn GC_register_my_thread(stack_base: *const GcStackBase) -> c_int;
|
fn GC_register_my_thread(stack_base: *const GcStackBase) -> c_int;
|
||||||
fn GC_set_stackbottom(thread: *const c_void, stack_bottom: *const GcStackBase);
|
fn GC_set_stackbottom(thread: *const c_void, stack_bottom: *const GcStackBase);
|
||||||
@@ -126,7 +127,7 @@ impl Allocator {
|
|||||||
|
|
||||||
unsafe impl GlobalAlloc for Allocator {
|
unsafe impl GlobalAlloc for Allocator {
|
||||||
unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
|
unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
|
||||||
GC_malloc(layout.size()) as *mut u8
|
GC_memalign(layout.align(), layout.size()) as *mut u8
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) {
|
unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) {
|
||||||
|
|||||||
2
vendor/bdwgc
vendored
2
vendor/bdwgc
vendored
Submodule vendor/bdwgc updated: 98e4d0a382...e8c073d786
2
vendor/libatomic_ops
vendored
2
vendor/libatomic_ops
vendored
Submodule vendor/libatomic_ops updated: 40d5b8c1ae...9f6bc3b928
Reference in New Issue
Block a user