48 Commits

Author SHA1 Message Date
Yota Toyama
3abd5dea37 chore: Release bdwgc-alloc version 0.6.5 2023-05-21 13:09:40 +10:00
Yota Toyama
ec67abe1ef Update CI (#254) 2023-05-21 03:08:06 +00:00
Yota Toyama
8f73f3d63a Refactor (#253) 2023-05-21 02:35:25 +00:00
dependabot[bot]
ca51b73cf5 chore(deps): Bump vendor/bdwgc from 5f6df10 to 71f838e (#252)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `5f6df10` to
`71f838e`.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="71f838eb6e"><code>71f838e</code></a>
Add debug logging to GC_clear_exclusion_table and
GC_exclude_static_roots</li>
<li><a
href="0b35c12b3f"><code>0b35c12</code></a>
Allow GC_push_roots to work even when no exclusions registered</li>
<li><a
href="a06340cc0b"><code>a06340c</code></a>
Fix GC_excl_table overrun on overflow in GC_exclude_static_roots</li>
<li><a
href="0a65033c4a"><code>0a65033</code></a>
Fix overlapping region assertion in mark_some if malloc redirect on
Linux</li>
<li><a
href="18e5b12da8"><code>18e5b12</code></a>
Clear GC_thread_key thread-local value on unregistering the thread</li>
<li><a
href="cd465f79c5"><code>cd465f7</code></a>
Fix GC_unregister_my_thread call before GC functions usage</li>
<li>See full diff in <a
href="5f6df10a93...71f838eb6e">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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2023-05-16 20:00:37 +00:00
dependabot[bot]
fbc2d363b8 chore(deps): Bump vendor/bdwgc from db76b2f to 5f6df10 (#251)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `db76b2f` to
`5f6df10`.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5f6df10a93"><code>5f6df10</code></a>
Make comparisons to the lowest heap boundary strict</li>
<li><a
href="ffc64167e4"><code>ffc6416</code></a>
Fix old name (typo) of gc_priv.h</li>
<li><a
href="1c2d6cf543"><code>1c2d6cf</code></a>
Fix comparisons to heap boundary in GC_get_back_ptr_info and
GC_mark_from</li>
<li><a
href="a0a416a8a9"><code>a0a416a</code></a>
Fix assertion in GC_mark_from regarding
GC_least_plausible_heap_addr</li>
<li>See full diff in <a
href="db76b2f831...5f6df10a93">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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2023-05-15 20:01:31 +00:00
Yota Toyama
7ff5ac5b21 Refactor (#250) 2023-05-15 17:40:34 +08:00
Yota Toyama
2d329a6e65 chore: Release bdwgc-alloc version 0.6.4 2023-05-14 17:13:35 +10:00
Yutaka HARA
59fe9dfa47 impl. register_finalizer, force_collect (#248) 2023-05-14 07:12:16 +00:00
Yota Toyama
d7521be32f Fix workflow (#249) 2023-05-14 07:07:25 +00:00
dependabot[bot]
0779f60a82 chore(deps): Bump vendor/bdwgc from 2bcec83 to db76b2f (#247)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `2bcec83` to `db76b2f`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](2bcec83b6e...db76b2f831)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-11 20:00:46 +00:00
dependabot[bot]
8d12fa613e chore(deps): Bump vendor/bdwgc from d654f40 to 2bcec83 (#246)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `d654f40` to `2bcec83`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](d654f40dea...2bcec83b6e)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 20:00:56 +00:00
dependabot[bot]
7578318bc1 chore(deps): Bump vendor/bdwgc from 4f44ad7 to d654f40 (#245)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `4f44ad7` to `d654f40`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](4f44ad7650...d654f40dea)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-04 20:02:00 +00:00
dependabot[bot]
974afa310e chore(deps): Bump vendor/bdwgc from 026dde2 to 4f44ad7 (#244)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `026dde2` to `4f44ad7`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](026dde22e2...4f44ad7650)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-03 20:00:26 +00:00
dependabot[bot]
12a68b35e5 chore(deps): Bump vendor/bdwgc from 60be9d4 to 026dde2 (#243)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `60be9d4` to `026dde2`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](60be9d4da2...026dde22e2)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-28 20:00:11 +00:00
dependabot[bot]
a03985d3ea chore(deps): Bump vendor/bdwgc from 4bdf9b9 to 60be9d4 (#242)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `4bdf9b9` to `60be9d4`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](4bdf9b9c32...60be9d4da2)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-27 20:00:48 +00:00
dependabot[bot]
22ddca7811 chore(deps): Bump vendor/bdwgc from 06ffb93 to 4bdf9b9 (#241)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `06ffb93` to `4bdf9b9`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](06ffb93814...4bdf9b9c32)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 20:00:21 +00:00
dependabot[bot]
833abbcecb chore(deps): Bump vendor/bdwgc from d70772a to 06ffb93 (#240)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `d70772a` to `06ffb93`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](d70772a42d...06ffb93814)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-20 20:03:38 +00:00
dependabot[bot]
450257b73e chore(deps): Bump vendor/bdwgc from 274e5ce to d70772a (#239)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `274e5ce` to `d70772a`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](274e5ced83...d70772a42d)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-17 20:00:31 +00:00
dependabot[bot]
bddf66861e chore(deps): Bump vendor/libatomic_ops from 2c8ba25 to e06dc95 (#238)
Bumps [vendor/libatomic_ops](https://github.com/ivmai/libatomic_ops) from `2c8ba25` to `e06dc95`.
- [Release notes](https://github.com/ivmai/libatomic_ops/releases)
- [Commits](2c8ba25186...e06dc9549f)

---
updated-dependencies:
- dependency-name: vendor/libatomic_ops
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-17 20:00:27 +00:00
dependabot[bot]
658f8f7b5b chore(deps): Bump vendor/bdwgc from d80ce05 to 274e5ce (#237)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `d80ce05` to `274e5ce`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](d80ce053ff...274e5ced83)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-12 20:57:12 +00:00
dependabot[bot]
273291836d chore(deps): Bump vendor/bdwgc from 6dfd81e to d80ce05 (#236)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `6dfd81e` to `d80ce05`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](6dfd81e1a0...d80ce053ff)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 20:00:40 +00:00
dependabot[bot]
186123157f chore(deps): Bump vendor/bdwgc from c94898b to 6dfd81e (#235)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `c94898b` to `6dfd81e`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](c94898ba7b...6dfd81e1a0)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 20:01:37 +00:00
dependabot[bot]
6e3107ab80 chore(deps): Bump vendor/libatomic_ops from 92435d4 to 2c8ba25 (#234)
Bumps [vendor/libatomic_ops](https://github.com/ivmai/libatomic_ops) from `92435d4` to `2c8ba25`.
- [Release notes](https://github.com/ivmai/libatomic_ops/releases)
- [Commits](92435d45be...2c8ba25186)

---
updated-dependencies:
- dependency-name: vendor/libatomic_ops
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-31 20:01:20 +00:00
dependabot[bot]
e0cb8aca15 chore(deps): Bump vendor/bdwgc from 132eb0b to c94898b (#233)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `132eb0b` to `c94898b`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](132eb0bc22...c94898ba7b)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-30 20:02:56 +00:00
dependabot[bot]
6d9ce150cd chore(deps): Bump vendor/libatomic_ops from 7f731c9 to 92435d4 (#232)
Bumps [vendor/libatomic_ops](https://github.com/ivmai/libatomic_ops) from `7f731c9` to `92435d4`.
- [Release notes](https://github.com/ivmai/libatomic_ops/releases)
- [Commits](7f731c9667...92435d45be)

---
updated-dependencies:
- dependency-name: vendor/libatomic_ops
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-28 20:01:23 +00:00
dependabot[bot]
3563d4e213 chore(deps): Bump vendor/bdwgc from 441698c to 132eb0b (#231)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `441698c` to `132eb0b`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](441698c68a...132eb0bc22)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-27 20:02:55 +00:00
dependabot[bot]
cbb3bd39d4 chore(deps): Bump vendor/libatomic_ops from a04ad40 to 7f731c9 (#230)
Bumps [vendor/libatomic_ops](https://github.com/ivmai/libatomic_ops) from `a04ad40` to `7f731c9`.
- [Release notes](https://github.com/ivmai/libatomic_ops/releases)
- [Commits](a04ad40056...7f731c9667)

---
updated-dependencies:
- dependency-name: vendor/libatomic_ops
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-27 20:01:55 +00:00
dependabot[bot]
85701b18c8 chore(deps): Bump vendor/bdwgc from b41a290 to 441698c (#229)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `b41a290` to `441698c`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](b41a2904f9...441698c68a)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-20 20:01:31 +00:00
dependabot[bot]
82e7664a74 chore(deps): Bump vendor/bdwgc from f21eefa to b41a290 (#228)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `f21eefa` to `b41a290`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](f21eefafc0...b41a2904f9)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 20:02:25 +00:00
dependabot[bot]
82c6516d29 chore(deps): Bump vendor/bdwgc from b49d1ae to f21eefa (#227)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `b49d1ae` to `f21eefa`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](b49d1aefc2...f21eefafc0)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-10 20:02:12 +00:00
dependabot[bot]
bd9137b1f6 chore(deps): Bump vendor/bdwgc from 92dce07 to b49d1ae (#226)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `92dce07` to `b49d1ae`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](92dce071fa...b49d1aefc2)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-08 20:00:51 +00:00
dependabot[bot]
f590a7c7ed chore(deps): Bump vendor/bdwgc from 6a283de to 92dce07 (#225)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `6a283de` to `92dce07`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](6a283de1db...92dce071fa)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-07 20:00:59 +00:00
dependabot[bot]
b31a5cff06 chore(deps): Bump vendor/bdwgc from 1c2f2c6 to 6a283de (#224)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `1c2f2c6` to `6a283de`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](1c2f2c6799...6a283de1db)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-06 20:01:35 +00:00
dependabot[bot]
c35a6a9212 chore(deps): Bump vendor/libatomic_ops from 344993c to a04ad40 (#223)
Bumps [vendor/libatomic_ops](https://github.com/ivmai/libatomic_ops) from `344993c` to `a04ad40`.
- [Release notes](https://github.com/ivmai/libatomic_ops/releases)
- [Commits](344993c87c...a04ad40056)

---
updated-dependencies:
- dependency-name: vendor/libatomic_ops
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-27 20:01:12 +00:00
dependabot[bot]
a74ccfc19c chore(deps): Bump vendor/bdwgc from 0e63b39 to 1c2f2c6 (#222)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `0e63b39` to `1c2f2c6`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](0e63b3923b...1c2f2c6799)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-20 20:00:31 +00:00
dependabot[bot]
d60cf964d0 chore(deps): Bump vendor/bdwgc from 272e61e to 0e63b39 (#221)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `272e61e` to `0e63b39`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](272e61e469...0e63b3923b)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-15 20:00:42 +00:00
dependabot[bot]
b824c776f6 chore(deps): Bump vendor/bdwgc from dac8f77 to 272e61e (#220)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `dac8f77` to `272e61e`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](dac8f77614...272e61e469)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-13 20:00:53 +00:00
dependabot[bot]
f41ade234c chore(deps): Bump vendor/bdwgc from 151b49a to dac8f77 (#219)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `151b49a` to `dac8f77`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](151b49a530...dac8f77614)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-09 20:01:00 +00:00
dependabot[bot]
e3d427aaf8 chore(deps): Bump vendor/bdwgc from 31fa843 to 151b49a (#218)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `31fa843` to `151b49a`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](31fa843270...151b49a530)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-02 19:04:11 +00:00
dependabot[bot]
362bbd4ac4 chore(deps): Bump vendor/bdwgc from f55e46c to 31fa843 (#217)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `f55e46c` to `31fa843`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](f55e46c34a...31fa843270)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-01 19:05:29 +00:00
dependabot[bot]
40fae8cfc5 chore(deps): Bump vendor/bdwgc from d389c2d to f55e46c (#216)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `d389c2d` to `f55e46c`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](d389c2d7f0...f55e46c34a)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-30 19:04:45 +00:00
dependabot[bot]
fa50cd76d1 chore(deps): Bump vendor/bdwgc from 04cdd2f to d389c2d (#215)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `04cdd2f` to `d389c2d`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](04cdd2f199...d389c2d7f0)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-26 19:04:59 +00:00
dependabot[bot]
e3162293df chore(deps): Bump vendor/bdwgc from 3dbb260 to 04cdd2f (#213)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `3dbb260` to `04cdd2f`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](3dbb260e5f...04cdd2f199)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-25 19:05:04 +00:00
dependabot[bot]
20fbf8e1e9 chore(deps): Bump vendor/libatomic_ops from 4bc05be to 344993c (#214)
Bumps [vendor/libatomic_ops](https://github.com/ivmai/libatomic_ops) from `4bc05be` to `344993c`.
- [Release notes](https://github.com/ivmai/libatomic_ops/releases)
- [Commits](4bc05be28b...344993c87c)

---
updated-dependencies:
- dependency-name: vendor/libatomic_ops
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-25 19:04:51 +00:00
dependabot[bot]
4dc952a872 chore(deps): Bump vendor/bdwgc from 98200e4 to 3dbb260 (#212)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `98200e4` to `3dbb260`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](98200e4fff...3dbb260e5f)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-20 19:04:14 +00:00
dependabot[bot]
fb4e72bcdd chore(deps): Bump vendor/libatomic_ops from 0445739 to 4bc05be (#211)
Bumps [vendor/libatomic_ops](https://github.com/ivmai/libatomic_ops) from `0445739` to `4bc05be`.
- [Release notes](https://github.com/ivmai/libatomic_ops/releases)
- [Commits](0445739035...4bc05be28b)

---
updated-dependencies:
- dependency-name: vendor/libatomic_ops
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-20 19:04:06 +00:00
dependabot[bot]
444ee0ecc1 chore(deps): Bump vendor/bdwgc from 04d7f70 to 98200e4 (#210)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `04d7f70` to `98200e4`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](04d7f70721...98200e4fff)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-03 19:05:05 +00:00
dependabot[bot]
b01f884f5d chore(deps): Bump vendor/bdwgc from 0a1667b to 04d7f70 (#209)
Bumps [vendor/bdwgc](https://github.com/ivmai/bdwgc) from `0a1667b` to `04d7f70`.
- [Release notes](https://github.com/ivmai/bdwgc/releases)
- [Commits](0a1667bee7...04d7f70721)

---
updated-dependencies:
- dependency-name: vendor/bdwgc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-02 19:04:09 +00:00
10 changed files with 121 additions and 31 deletions

11
.cspell.json Normal file
View File

@@ -0,0 +1,11 @@
{
"words": [
"dealloc",
"finalizer",
"gcollect",
"libc",
"realloc",
"repr",
"stackbottom"
]
}

View File

@@ -1,5 +1,9 @@
version: 2 version: 2
updates: updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
- package-ecosystem: cargo - package-ecosystem: cargo
directory: / directory: /
schedule: schedule:

View File

@@ -3,5 +3,9 @@ pull_request_rules:
conditions: conditions:
- author=dependabot[bot] - author=dependabot[bot]
actions: actions:
merge: queue:
name: default
method: squash method: squash
queue_rules:
- name: default
conditions: []

34
.github/workflows/lint.yaml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: lint
on:
push:
branches:
- main
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: Swatinem/rust-cache@v2
- run: cargo clippy -- -D warnings
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cargo fmt -- --check
spell-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: streetsidesoftware/cspell-action@main
with:
files: "**/*.{md,rs}"
readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: lycheeverse/lychee-action@v1
with:
fail: true

View File

@@ -1,30 +1,41 @@
name: test name: test
on: on:
- push push:
branches:
- main
pull_request:
jobs: jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: Swatinem/rust-cache@v2
- run: cargo build
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
submodules: true submodules: true
- uses: actions-rs/toolchain@v1 - uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1 - run: cargo test
examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: with:
command: build submodules: true
- uses: actions-rs/cargo@v1 - uses: Swatinem/rust-cache@v2
with:
command: fmt
args: -- --check
- uses: actions-rs/cargo@v1
with:
command: clippy
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- run: | - run: |
cd examples cd examples
./test.sh ./test.sh
- run: | cmake:
git clean -dfx runs-on: ubuntu-latest
cargo build --no-default-features --features cmake steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: Swatinem/rust-cache@v2
- run: cargo build --no-default-features --features cmake

View File

@@ -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.3" version = "0.6.5"
authors = [ authors = [
"swgillespie <sean.william.g@gmail.com>", "swgillespie <sean.william.g@gmail.com>",
"Yota Toyama <raviqqe@gmail.com>", "Yota Toyama <raviqqe@gmail.com>",

View File

@@ -1,3 +1,8 @@
use std::{
error,
fmt::{self, Display, Formatter},
};
#[derive(Debug)] #[derive(Debug)]
pub struct Error { pub struct Error {
description: &'static str, description: &'static str,
@@ -9,13 +14,13 @@ impl Error {
} }
} }
impl std::fmt::Display for Error { impl Display for Error {
fn fmt(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { fn fmt(&self, formatter: &mut Formatter) -> fmt::Result {
write!(formatter, "{}", self.description) write!(formatter, "{}", self.description)
} }
} }
impl std::error::Error for Error { impl error::Error for Error {
fn description(&self) -> &str { fn description(&self) -> &str {
self.description self.description
} }

View File

@@ -1,9 +1,12 @@
extern crate libc; #![doc = include_str!("../README.md")]
extern crate alloc;
mod error; mod error;
use alloc::alloc::{GlobalAlloc, Layout};
use core::ptr::null;
use libc::{c_int, c_void, size_t}; use libc::{c_int, c_void, size_t};
use std::alloc::{GlobalAlloc, Layout};
const GC_SUCCESS: c_int = 0; const GC_SUCCESS: c_int = 0;
@@ -26,6 +29,14 @@ extern "C" {
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);
fn GC_unregister_my_thread(); fn GC_unregister_my_thread();
fn GC_gcollect();
fn GC_register_finalizer(
ptr: *const c_void,
finalizer: extern "C" fn(*mut c_void, *mut c_void),
client_data: *const c_void,
opt_old_finalizer: *const c_void,
opt_old_client_data: *const c_void,
) -> *mut c_void;
} }
pub struct Allocator; pub struct Allocator;
@@ -45,9 +56,7 @@ impl Allocator {
} }
pub unsafe fn register_current_thread() -> Result<(), error::Error> { pub unsafe fn register_current_thread() -> Result<(), error::Error> {
let mut base = GcStackBase { let mut base = GcStackBase { mem_base: null() };
mem_base: std::ptr::null(),
};
if GC_get_stack_base(&mut base) != GC_SUCCESS { if GC_get_stack_base(&mut base) != GC_SUCCESS {
return Err(error::Error::new("failed to get stack base")); return Err(error::Error::new("failed to get stack base"));
@@ -60,7 +69,7 @@ impl Allocator {
pub unsafe fn set_stack_bottom(bottom: *const u8) { pub unsafe fn set_stack_bottom(bottom: *const u8) {
GC_set_stackbottom( GC_set_stackbottom(
std::ptr::null(), null(),
&GcStackBase { &GcStackBase {
mem_base: bottom as *const libc::c_void, mem_base: bottom as *const libc::c_void,
}, },
@@ -70,6 +79,18 @@ impl Allocator {
pub unsafe fn unregister_current_thread() { pub unsafe fn unregister_current_thread() {
GC_unregister_my_thread() GC_unregister_my_thread()
} }
pub fn force_collect() {
unsafe { GC_gcollect() }
}
pub unsafe fn register_finalizer(
ptr: *const c_void,
finalizer: extern "C" fn(*mut c_void, *mut c_void),
client_data: *const c_void,
) {
GC_register_finalizer(ptr, finalizer, client_data, null(), null());
}
} }
unsafe impl GlobalAlloc for Allocator { unsafe impl GlobalAlloc for Allocator {

2
vendor/bdwgc vendored