vorner / bumpalo-herd Goto Github PK
View Code? Open in Web Editor NEWTrying to create Sync bump allocator
License: Apache License 2.0
Trying to create Sync bump allocator
License: Apache License 2.0
cargo miri test
changed to be more compatible with cargo test
, but this means we had to find a different way to pass flags to the interpreter, so there now is a MIRIFLAGS
environment variable for that. The old way still works for now, but is deprecated.
This affects the following line:
Line 20 in 3590e4e
cargo miri test miri
(running the same tests as cargo test miri
).In latest Rust nightly we can allocate with custom allocator (for example https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html#method.new_in).
It will be great for bumpalo-herd to provide the ability to use this. To achieve this, we need to implement std::alloc::AllocRef
.
See also fitzgen/bumpalo#87.
Are collections supported?
Is this the correct way to use them, it seems to work:
struct MyStruct {
a: usize,
b: usize,
}
let bvec: &mut Vec<MyStruct> = gr.bumpalo_herd.get().alloc(vec![]);
bvec.push(MyStruct {
a: 12,
b: 53,
});
for x in bvec {
println!("{}/{}", x.a, x.b);
}
First of all I'd like to say that it is a great crate and it is very relevant to my work.
While working with it I came a cross of several ideas, not sure if @vorner would find them adequate:
get_by_id()
method which would allow to get a Bump attached to some kind of resource - a thread for example. Members acquired in such a way would not be shared between different resources - only within one resource designated by some kind of user-provided ID (thread ID, worker ID, coroutine ID, whatever).reset_unsafe()
method so that if user could reset an individual member if he really knows what he's doing. That is supposed to play together with the above method.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.