Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
wenyuzhao committed May 23, 2024
2 parents 7c4db9f + 7ff89cf commit 2046ddc
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion buddy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "buddy"
version = { workspace = true }
authors = ["Wenyu Zhao <wenyu.zhao@anu.edu.au>"]
authors = ["Wenyu Zhao <wenyuzhaox@gmail.com>"]
edition = { workspace = true }

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion bump/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "bump"
version = { workspace = true }
authors = ["Wenyu Zhao <wenyu.zhao@anu.edu.au>"]
authors = ["Wenyu Zhao <wenyuzhaox@gmail.com>"]
edition = { workspace = true }

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion hoard/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "hoard"
version = { workspace = true }
authors = ["Wenyu Zhao <wenyu.zhao@anu.edu.au>"]
authors = ["Wenyu Zhao <wenyuzhaox@gmail.com>"]
edition = { workspace = true }

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion mallockit/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "mallockit"
version = { workspace = true }
authors = ["Wenyu Zhao <wenyu.zhao@anu.edu.au>"]
authors = ["Wenyu Zhao <wenyuzhaox@gmail.com>"]
edition = { workspace = true }

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion mallockit/macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "mallockit-macros"
version = { workspace = true }
authors = ["Wenyu Zhao <wenyu.zhao@anu.edu.au>"]
authors = ["Wenyu Zhao <wenyuzhaox@gmail.com>"]
edition = { workspace = true }

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
6 changes: 4 additions & 2 deletions mallockit/src/util/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
target_os = "macos",
all(target_os = "windows", target_pointer_width = "64")
)))]
pub const MIN_ALIGNMENT: usize = 16; // should be 8?
pub const LOG_MIN_ALIGNMENT: usize = 4; // should be 8?
#[cfg(any(
target_os = "macos",
all(target_os = "windows", target_pointer_width = "64")
))]
pub const MIN_ALIGNMENT: usize = 16;
pub const LOG_MIN_ALIGNMENT: usize = 4;

pub const MIN_ALIGNMENT: usize = 1 << LOG_MIN_ALIGNMENT;
4 changes: 3 additions & 1 deletion mallockit/src/util/mem/size_class.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
use std::alloc::Layout;

use crate::util::constants::LOG_MIN_ALIGNMENT;

use super::layout_utils::LayoutUtils;

#[repr(transparent)]
#[derive(Debug, Clone, Copy)]
pub struct SizeClass<const LOG_COVERAGE: u8 = 4>(pub u8);
pub struct SizeClass<const LOG_COVERAGE: u8 = LOG_MIN_ALIGNMENT>(pub u8);

impl<const LOG_COVERAGE: u8> SizeClass<LOG_COVERAGE> {
pub const fn as_usize(self) -> usize {
Expand Down
2 changes: 1 addition & 1 deletion sanity/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sanity"
version = { workspace = true }
authors = ["Wenyu Zhao <wenyu.zhao@anu.edu.au>"]
authors = ["Wenyu Zhao <wenyuzhaox@gmail.com>"]
edition = { workspace = true }

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down

0 comments on commit 2046ddc

Please sign in to comment.