bastion-rs / allocator-suite Goto Github PK
View Code? Open in Web Editor NEWAllocator Suite which contains various allocators for workload-specific allocation.
Allocator Suite which contains various allocators for workload-specific allocation.
Hi all,
I am trying to update the crate to compile using the current nightly compiler. This requires:
AllocErr
with the new AllocError
AllocRef
, which has been replaced by a blanket impl in stdllvm-asm!
assembly to platform-specific asm!
assembly blocks.The first two changes are trivial, but I can't fix the last one myself due to not being familiar with assembly at all. The original llvm-asm!
macro has been completely removed and the compiler maintainers do not plan on bringing it back1. Instead, one should manually write platform-specific assembly using the asm!
macro.
Could someone help with the last bit?
Would be cool to get this crate working again!
this is because llvm assembly is apparently unstable between different versions of llvm โฉ
Looks like the api changed again :/
|
2 | use std::alloc::{AllocErr, AllocInit, AllocRef, GlobalAlloc, Layout, MemoryBlock};
| ^^^^^^^^^ no `AllocInit` in `alloc`
error[E0050]: method `alloc` has 3 parameters but the declaration in trait `std::alloc::AllocRef::alloc` has 2
##[error] --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/allocator-suite-0.1.6/src/adaptors/allocator_adaptor.rs:47:14
|
47 | fn alloc(&mut self, layout: Layout, init: AllocInit) -> Result<MemoryBlock, AllocErr> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 parameters, found 3
|
= note: `alloc` from trait: `fn(&mut Self, std::alloc::Layout) -> std::result::Result<std::alloc::MemoryBlock, std::alloc::AllocErr>`
error: aborting due to 2 previous errors
##[error]aborting due to 2 previous errors
Some errors have detailed explanations: E0050, E0432.
For more information about an error, try `rustc --explain E0050`.
error: could not compile `allocator-suite`.
##[error]could not compile `allocator-suite`.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
##[warning]error: build failed
##[error]The process '/usr/share/rust/.cargo/bin/cargo' failed with exit code 101```
Need to write optimizations to make it work on both stable
and nightly
.
Moreover, intel, arm, and others have different hinting options. Write this as a separate crate.
Hi,
Wanted to try this crate but it currently fails to compile on latest nightly due to some change to alloc
(https://doc.rust-lang.org/nightly/core/alloc/index.html):
error[E0432]: unresolved imports `std::alloc::Alloc`, `std::alloc::CannotReallocInPlace`, `std::alloc::Excess`
--> src/adaptors/allocator_adaptor.rs:2:18
|
2 | use std::alloc::{Alloc, AllocErr, CannotReallocInPlace, Excess, GlobalAlloc, Layout};
| ^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^ no `Excess` in `alloc`
| | |
| | no `CannotReallocInPlace` in `alloc`
| no `Alloc` in `alloc`
| help: a similar name exists in the module: `alloc`
error[E0432]: unresolved import `std::alloc::Alloc`
--> src/adaptors/alloc_to_allocator_adaptor.rs:4:18
|
4 | use std::alloc::{Alloc, AllocErr, Layout};
| ^^^^^
| |
| no `Alloc` in `alloc`
| help: a similar name exists in the module: `alloc`
error[E0432]: unresolved import `std::alloc::Alloc`
--> src/allocators/global/global_switchable_allocator.rs:4:18
|
4 | use std::alloc::{Alloc, GlobalAlloc};
| ^^^^^
| |
| no `Alloc` in `alloc`
| help: a similar name exists in the module: `alloc`
error[E0432]: unresolved imports `std::alloc::CannotReallocInPlace`, `std::alloc::Excess`
--> src/allocators/allocator.rs:7:28
|
7 | use std::alloc::{AllocErr, CannotReallocInPlace, Excess, Layout};
| ^^^^^^^^^^^^^^^^^^^^ ^^^^^^ no `Excess` in `alloc`
| |
| no `CannotReallocInPlace` in `alloc`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.