-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
867 additions
and
948 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ on: | |
env: | ||
RUSTFLAGS: -Dwarnings | ||
RUST_BACKTRACE: 1 | ||
nightly: nightly-2022-06-27 | ||
nightly: nightly | ||
|
||
defaults: | ||
run: | ||
|
@@ -50,22 +50,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Apply clippy lints | ||
run: cargo clippy --all-features | ||
|
||
# This represents the minimum Rust version supported by | ||
# Bytes. Updating this should be done in a dedicated PR. | ||
# | ||
# Tests are not run as tests may require newer versions of | ||
# rust. | ||
minrust: | ||
name: minrust | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Rust | ||
run: rustup update 1.61.0 && rustup default 1.61.0 | ||
- name: Check | ||
run: . ci/test-stable.sh check | ||
run: cargo clippy | ||
|
||
# Stable | ||
stable: | ||
|
@@ -82,19 +67,10 @@ jobs: | |
- name: Install Rust | ||
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe. | ||
run: rustup update stable --no-self-update && rustup default stable | ||
- name: Test | ||
run: . ci/test-stable.sh test | ||
|
||
# Nightly | ||
nightly: | ||
name: nightly | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Rust | ||
run: rustup update $nightly && rustup default $nightly | ||
- name: Test | ||
run: . ci/test-stable.sh test | ||
- name: Test with std | ||
run: cargo test --features future,tokio,async-std,smol | ||
- name: Test without std | ||
run: cargo test --no-default-features --features core | ||
|
||
# Run tests on some extra platforms | ||
cross: | ||
|
@@ -110,7 +86,6 @@ jobs: | |
- wasm32-unknown-unknown | ||
- i686-unknown-linux-gnu | ||
- powerpc64-unknown-linux-gnu | ||
- mips64-unknown-linux-gnuabi64 | ||
- riscv64gc-unknown-linux-gnu | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -173,16 +148,15 @@ jobs: | |
|
||
# Run with valgrind | ||
- name: Run valgrind test-concurrent-allocator | ||
run: valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./target/debug/integration | ||
run: valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./target/debug/integration | ||
working-directory: integration | ||
|
||
tarpaulin: | ||
coverage: | ||
name: cargo tarpaulin | ||
needs: | ||
- rustfmt | ||
- clippy | ||
- stable | ||
- nightly | ||
- minrust | ||
- cross | ||
- sanitizer | ||
runs-on: ubuntu-latest | ||
|
@@ -204,40 +178,13 @@ jobs: | |
target | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- uses: actions-rs/[email protected] | ||
- name: Install cargo-tarpaulin | ||
run: cargo install cargo-tarpaulin | ||
|
||
- name: Run cargo tarpaulin | ||
run: cargo tarpaulin --all-features --run-types Tests,Doctests --out Xml | ||
run: cargo tarpaulin --features tokio,async-std,smol --run-types AllTargets --out xml | ||
|
||
- name: Upload to codecov.io | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: file | ||
|
||
publish_docs: | ||
name: Publish Documentation | ||
needs: | ||
- rustfmt | ||
- clippy | ||
- stable | ||
- nightly | ||
- minrust | ||
- cross | ||
- sanitizer | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Rust | ||
run: rustup update stable && rustup default stable | ||
- name: Build documentation | ||
run: cargo doc --no-deps --all-features | ||
env: | ||
RUSTDOCFLAGS: --cfg docsrs | ||
- name: Publish documentation | ||
run: | | ||
cd target/doc | ||
git init | ||
git add . | ||
git -c user.name='ci' -c user.email='ci' commit -m 'Deploy zallocator API documentation' | ||
git push -f -q https://git:${{ secrets.github_token }}@github.com/${{ github.repository }} HEAD:gh-pages | ||
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master' && github.repository == 'al8n/zallocator' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: loc | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'README.md' | ||
- 'COPYRIGHT' | ||
- 'LICENSE*' | ||
- '**.md' | ||
- '**.txt' | ||
- 'art' | ||
pull_request: | ||
paths-ignore: | ||
- 'README.md' | ||
- 'COPYRIGHT' | ||
- 'LICENSE*' | ||
- '**.md' | ||
- '**.txt' | ||
- 'art' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
loc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Rust | ||
run: | | ||
rustup update stable && rustup default stable | ||
rustup component add clippy | ||
rustup component add rustfmt | ||
- name: Install tokeit | ||
run: | | ||
cargo install tokeit --force | ||
- name: Count lines of code | ||
run: | | ||
tokeit | ||
- name: Upload loc to GitHub Gist | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{secrets.GIST_PAT}} | ||
script: | | ||
const fs = require('fs'); | ||
const output = fs.readFileSync('tokeit.json', 'utf8'); | ||
const gistId = '4c7ca488a5bbc9f5a7db0d4cd6e26374'; | ||
await github.rest.gists.update({ | ||
gist_id: gistId, | ||
files: { | ||
"zallocator": { | ||
content: output | ||
} | ||
} | ||
}); | ||
console.log("Gist updated"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "zallocator" | ||
version = "0.3.0" | ||
version = "0.5.0" | ||
authors = ["Al Liu <[email protected]>"] | ||
edition = "2021" | ||
license = "MIT/Apache-2.0" | ||
|
@@ -9,9 +9,7 @@ documentation = "https://docs.rs/zallocator" | |
description = "Amortizes the cost of small allocations by allocating memory in bigger chunks." | ||
keywords = ["allocator", "memory"] | ||
categories = ["data-structures", "no-std", "concurrency"] | ||
|
||
[workspace] | ||
members = [".", "integration"] | ||
rust-version = "1.70.0" | ||
|
||
[[bench]] | ||
name = "allocator" | ||
|
@@ -20,44 +18,71 @@ harness = false | |
|
||
[features] | ||
default = ["std"] | ||
full = ["std", "async-pool", "threadpool"] | ||
std = ["rand/std", "rand/std_rng", "lazy_static", "parking_lot", "hashbrown", "crossbeam-utils/default", "triomphe/default"] | ||
std = [ | ||
"rand/std", | ||
"rand/std_rng", | ||
"parking_lot", | ||
"crossbeam-utils/default", | ||
"crossbeam-queue/default", | ||
"triomphe/default", | ||
] | ||
core = ["lazy_static/spin_no_std", "spin", "rand/alloc", "hashbrown"] | ||
js = ["getrandom/js"] | ||
inline-more = ["hashbrown/inline-more"] | ||
async-pool = ["pollster", "futures/default", "async-channel", "async-io"] | ||
threadpool = ["crossbeam-channel"] | ||
nightly = ["crossbeam-utils/nightly"] | ||
js = ["getrandom/js", "futures-timer/wasm-bindgen"] | ||
future = ["futures-timer"] | ||
|
||
tokio = ["dep:tokio", "future"] | ||
async-std = ["dep:async-std", "future"] | ||
smol = ["dep:smol", "future"] | ||
|
||
[dependencies] | ||
crossbeam-queue = { version = "0.3", default-features = false, features = ["alloc"] } | ||
crossbeam-channel = { version = "0.5", optional = true } | ||
crossbeam-queue = { version = "0.3", default-features = false, features = [ | ||
"alloc", | ||
] } | ||
crossbeam-utils = { version = "0.8", default-features = false } | ||
futures = { version = "0.3", optional = true } | ||
lazy_static = { version = "1.4", optional = true, default-features = false } | ||
hashbrown = { version = "0.12", optional = true } | ||
pollster = { version = "0.2", optional = true } | ||
parking_lot = { version = "0.12", optional = true } | ||
rand = { version = "0.8", optional = true, default-features = false } | ||
lazy_static = { version = "1.4", default-features = false } | ||
rand = { version = "0.8", default-features = false } | ||
triomphe = { version = "0.1", default-features = false } | ||
|
||
futures-timer = { version = "3", optional = true } | ||
|
||
getrandom = { version = "0.2", optional = true } | ||
hashbrown = { version = "0.14", optional = true } | ||
|
||
parking_lot = { version = "0.12", optional = true } | ||
spin = { version = "0.9", optional = true } | ||
triomphe = { version = "0.1", default-features = false } | ||
async-channel = { version = "1.7", optional = true } | ||
async-io = { version = "1.8", optional = true } | ||
|
||
tokio = { version = "1", default-features = false, features = [ | ||
"rt", | ||
], optional = true } | ||
async-std = { version = "1", optional = true } | ||
smol = { version = "2", optional = true, default-features = false } | ||
|
||
[dev-dependencies] | ||
tokio = { version = "1.19", features = ["full"] } | ||
tokio-test = "0.4" | ||
futures = "0.3" | ||
criterion = "0.3" | ||
criterion = "0.5" | ||
rand = "0.8" | ||
tokio = { version = "1", features = ["full"] } | ||
tokio-test = "0.4" | ||
paste = "1" | ||
smol = "2" | ||
async-std = "1" | ||
|
||
[target.'cfg(loom)'.dev-dependencies] | ||
loom = "0.5" | ||
loom = "0.7" | ||
|
||
[target.'cfg(wasm)'.dependencies] | ||
getrandom = { version = "0.2", features = ["js"] } | ||
|
||
[[example]] | ||
name = "async-pool" | ||
path = "examples/async_pool.rs" | ||
required-features = ["tokio"] | ||
|
||
[[example]] | ||
name = "pool" | ||
path = "examples/pool.rs" | ||
required-features = ["std"] | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
rustdoc-args = ["--cfg", "docsrs"] | ||
no-default-features = false | ||
features = ["future", "tokio", "async-std", "smol", "std"] | ||
rustdoc-args = ["--cfg", "docsrs"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,63 @@ | ||
> Project was moved to https://github.com/al8n/veladb/tree/main/zallocator | ||
<div align="center"> | ||
<h1>Zallocator</h1> | ||
</div> | ||
<div align="center"> | ||
|
||
[<img alt="github" src="https://img.shields.io/badge/GITHUB-al8n/zallocator-8da0cb?style=for-the-badge&logo=Github" height="22">][Github-url] | ||
<img alt="LoC" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fal8n%2F4c7ca488a5bbc9f5a7db0d4cd6e26374%2Fraw%2Fzallocator" height="22"> | ||
[<img alt="Build" src="https://img.shields.io/github/actions/workflow/status/al8n/zallocator/ci.yaml?logo=Github-Actions&style=for-the-badge" height="22">][CI-url] | ||
[<img alt="codecov" src="https://img.shields.io/codecov/c/gh/al8n/zallocator?style=for-the-badge&token=lmlj6AMQxz&logo=codecov" height="22">][codecov-url] | ||
|
||
[<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-zallocator-66c2a5?style=for-the-badge&labelColor=555555&logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K" height="20">][doc-url] | ||
[<img alt="crates.io" src="https://img.shields.io/crates/v/zallocator?style=for-the-badge&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgdmlld0JveD0iMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPGc+DQoJCTxwYXRoIGQ9Ik0yNTYsMEwzMS41MjgsMTEyLjIzNnYyODcuNTI4TDI1Niw1MTJsMjI0LjQ3Mi0xMTIuMjM2VjExMi4yMzZMMjU2LDB6IE0yMzQuMjc3LDQ1Mi41NjRMNzQuOTc0LDM3Mi45MTNWMTYwLj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">][crates-url] | ||
|
||
[<img alt="license-apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=for-the-badge&logo=Apache" height="22">][license-apache-url] | ||
[<img alt="license-mit" src="https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge&fontColor=white&logoColor=f5c076&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI2Y1YzA3NiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEwLjA4IDEwLjg2Yy4wNS0uMzMuMTYtLjYyLjMtLjg3cy4zNC0uNDYuNTktLjYyYy4yNC0uMTUuNTQtLjIyLjkxLS4yMy4yMy4wMS40NC4wNS42My4xMy4yLjA5LjM4LjIxLjUyLjM2cy4yNS4zMy4zNC41My4xMy40Mi4xNC42NGgxLjc5Yy0uMDItLjQ3LS4xMS0uOS0uMjgtMS4yOXMtLjQtLjczLS43LTEuMDEtLjY2LS41LTEuMDgtLjY2LS44OC0uMjMtMS4zOS0uMjNjLS42NSAwLTEuMjIuMTEtMS43LjM0cy0uODguNTMtMS4yLjkyLS41Ni44NC0uNzEgMS4zNlM4IDExLjI5IDggMTEuODd2LjI3YzAgLjU4LjA4IDEuMTIuMjMgMS42NHMuMzkuOTcuNzEgMS4zNS43Mi42OSAxLjIuOTFjLjQ4LjIyIDEuMDUuMzQgMS43LjM0LjQ3IDAgLjkxLS4wOCAxLjMyLS4yM3MuNzctLjM2IDEuMDgtLjYzLjU2LS41OC43NC0uOTQuMjktLjc0LjMtMS4xNWgtMS43OWMtLjAxLjIxLS4wNi40LS4xNS41OHMtLjIxLjMzLS4zNi40Ni0uMzIuMjMtLjUyLjNjLS4xOS4wNy0uMzkuMDktLjYuMS0uMzYtLjAxLS42Ni0uMDgtLjg5LS4yMy0uMjUtLjE2LS40NS0uMzctLjU5LS42MnMtLjI1LS41NS0uMy0uODgtLjA4LS42Ny0uMDgtMXYtLjI3YzAtLjM1LjAzLS42OC4wOC0xLjAxek0xMiAyQzYuNDggMiAyIDYuNDggMiAxMnM0LjQ4IDEwIDEwIDEwIDEwLTQuNDggMTAtMTBTMTcuNTIgMiAxMiAyem0wIDE4Yy00LjQxIDAtOC0zLjU5LTgtOHMzLjU5LTggOC04IDggMy41OSA4IDgtMy41OSA4LTggOHoiLz48L3N2Zz4=" height="22">][license-mit-url] | ||
|
||
Amortizes the cost of small allocations by allocating memory in bigger chunks. | ||
|
||
</div> | ||
|
||
## Installation | ||
|
||
```toml | ||
zallocator = "0.4" | ||
``` | ||
|
||
- Enable async related methods | ||
|
||
```toml | ||
zallocator = { version = "0.4", features = ["future"] } | ||
``` | ||
|
||
- Without `std` | ||
|
||
```toml | ||
zallocator = { version = "0.4", default-features = false, features = ["core"] } | ||
``` | ||
|
||
## License | ||
|
||
<sup> | ||
Licensed under either of <a href="https://opensource.org/licenses/Apache-2.0">Apache License, Version | ||
2.0</a> or <a href="https://opensource.org/licenses/MIT">MIT license</a> at your option. | ||
</sup> | ||
|
||
<br> | ||
|
||
<sub> | ||
Unless you explicitly state otherwise, any contribution intentionally submitted | ||
for inclusion in this project by you, as defined in the Apache-2.0 license, | ||
shall be dual licensed as above, without any additional terms or conditions. | ||
</sub> | ||
|
||
[Github-url]: https://github.com/al8n/zallocator/ | ||
[CI-url]: https://github.com/al8n/zallocator/actions/workflows/ci.yml | ||
[doc-url]: https://docs.rs/zallocator | ||
[crates-url]: https://crates.io/crates/zallocator | ||
[codecov-url]: https://app.codecov.io/gh/al8n/zallocator/ | ||
[license-url]: https://opensource.org/licenses/Apache-2.0 | ||
[rustc-url]: https://github.com/rust-lang/rust/blob/master/RELEASES.md | ||
[license-apache-url]: https://opensource.org/licenses/Apache-2.0 | ||
[license-mit-url]: https://opensource.org/licenses/MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.