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 use std::time::Instant to 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 os environment, 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_map module). Currently, it relies on Vec and Box. Eventually, it should either drop these dependencies (and be implemented in terms of raw chunks of memory and raw pointers) or be upgraded once Vec and Box support 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)
slab-alloc
currently has anos
feature and astd
feature (which depends on theos
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 makingslab-alloc
truly support a no-std or no-os environment.Tasks:
util::workingset
, we usestd::time::Instant
to keep track of time. Instead, we need some mechanism (probably a trait) for keeping track of time that is agnostic to implementation. (#3)os
environment, 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)ptr_map
module). Currently, it relies onVec
andBox
. Eventually, it should either drop these dependencies (and be implemented in terms of raw chunks of memory and raw pointers) or be upgraded onceVec
andBox
support parametric allocators. (#6)ptr_map
, we should make it so that the user can supply a custom allocator for this purpose. (#6)