allocators-rs
allocators-rs copied to clipboard
slab-alloc: Support no-std and no-os
slab-alloc currently has an os feature and a std feature (which depends on the os feature). However, the code as it stands today can't actually compile without both features being enabled (which is the default). This issue tracks progress towards making slab-alloc truly support a no-std or no-os environment.
Tasks:
- [ ] Create a mechanism for abstracting over time. Currently, in
util::workingset, we usestd::time::Instantto keep track of time. Instead, we need some mechanism (probably a trait) for keeping track of time that is agnostic to implementation. (#3) - [ ] Once a mechanism for abstracting over time exists, we should make it so that the user can supply it. In an
osenvironment, we can implement this ourselves, but in a no-os environment, we have no way of knowing how time is represented or how to get the current time, so it must be provided by the user. (#3) - [ ] Support custom allocators for the pointer hashmap (
ptr_mapmodule). Currently, it relies onVecandBox. Eventually, it should either drop these dependencies (and be implemented in terms of raw chunks of memory and raw pointers) or be upgraded onceVecandBoxsupport parametric allocators. (#6) - [ ] Once we support custom allocators in
ptr_map, we should make it so that the user can supply a custom allocator for this purpose. (#6)
How far along is this?
We've made no progress on this.
However, @shivanth mentioned that they might work on #3. I don't know if that's happened.