Skip to content

Commit

Permalink
v0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Cannon Tuttle committed Aug 13, 2023
1 parent ffad5c2 commit ce3fb5a
Show file tree
Hide file tree
Showing 5 changed files with 468 additions and 177 deletions.
7 changes: 0 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ crate-type = ["cdylib"]

[dependencies]
buddy-alloc = { version = "0.4.1", optional = true }
bobbin-bits = "0.1.1"
num = "0.4.1"

[profile.release]
opt-level = "z"
lto = true
codegen-units = 1 # Reduce number of codegen units to increase optimizations
panic = 'abort' # Abort on panic
strip = true # Strip symbols from binary*

[features]
# use `--no-default-features` or comment out next line to disable allocator
Expand Down
6 changes: 3 additions & 3 deletions src/alloc.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use buddy_alloc::{BuddyAllocParam, FastAllocParam, NonThreadsafeAlloc};

// These values can be tuned
const FAST_HEAP_SIZE: usize = 4 * 1024; // 4 KB
const HEAP_SIZE: usize = 16 * 1024; // 16 KB
const LEAF_SIZE: usize = 16;
const FAST_HEAP_SIZE: usize = 1 * 1024; // 1 KB
const HEAP_SIZE: usize = 30 * 1024; // 48 KB
const LEAF_SIZE: usize = 1024;

static mut FAST_HEAP: [u8; FAST_HEAP_SIZE] = [0u8; FAST_HEAP_SIZE];
static mut HEAP: [u8; HEAP_SIZE] = [0u8; HEAP_SIZE];
Expand Down
Loading

0 comments on commit ce3fb5a

Please sign in to comment.