added GlobalAlloc
This commit is contained in:
parent
3cb89896eb
commit
2a6da1a7f3
7
Cargo.lock
generated
7
Cargo.lock
generated
@ -86,6 +86,12 @@ version = "0.2.140"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "libc_alloc"
|
||||||
|
version = "1.0.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "6a090348b66d90d8507e30f0d2bd88e5a5c454bd1733fc6d617cbc3471bf69ea"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libloading"
|
name = "libloading"
|
||||||
version = "0.7.4"
|
version = "0.7.4"
|
||||||
@ -190,6 +196,7 @@ version = "0.0.2"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bindgen",
|
"bindgen",
|
||||||
"libc",
|
"libc",
|
||||||
|
"libc_alloc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "spd"
|
name = "spd"
|
||||||
version = "0.0.2"
|
version = "0.0.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "LGPL-3.0-or-later"
|
license = "LGPL-3.0-or-later"
|
||||||
authors = [
|
authors = [
|
||||||
@ -13,6 +13,7 @@ repository = "https://git.tebibyte.media/emma/spd"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2.140"
|
libc = "0.2.140"
|
||||||
|
libc_alloc = "1.0.4"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
bindgen = "0.64.0"
|
bindgen = "0.64.0"
|
||||||
|
@ -73,8 +73,13 @@ pub use libc_print as print;
|
|||||||
pub use libc_println as println;
|
pub use libc_println as println;
|
||||||
pub use libc_writeln as writeln;
|
pub use libc_writeln as writeln;
|
||||||
|
|
||||||
|
pub use libc_alloc::LibcAlloc;
|
||||||
|
|
||||||
pub const SOURCE: &str = "https://git.tebibyte.media/emma/spd.git";
|
pub const SOURCE: &str = "https://git.tebibyte.media/emma/spd.git";
|
||||||
|
|
||||||
|
#[global_allocator]
|
||||||
|
pub static ALLOCATOR: LibcAlloc = LibcAlloc;
|
||||||
|
|
||||||
#[panic_handler]
|
#[panic_handler]
|
||||||
pub fn panic(info: &panic::PanicInfo) -> ! {
|
pub fn panic(info: &panic::PanicInfo) -> ! {
|
||||||
eprintln!("{:?}", info);
|
eprintln!("{:?}", info);
|
||||||
|
Reference in New Issue
Block a user