Code Monkey home page Code Monkey logo

allocator-suite's People

Contributors

o0ignition0o avatar vertexclique avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

allocator-suite's Issues

llvm-asm was depricated

Hi all,

I am trying to update the crate to compile using the current nightly compiler. This requires:

  • replacing AllocErr with the new AllocError
  • removing implementations of AllocRef, which has been replaced by a blanket impl in std
  • reworking the llvm-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!

Footnotes

  1. this is because llvm assembly is apparently unstable between different versions of llvm โ†ฉ

Update std::alloc api

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```

Build on latest nightly fails

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`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.