Open
Description
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::Instant
to keep track of time. Instead, we need some mechanism (probably a trait) for keeping track of time that is agnostic to implementation. (slab-alloc: Create mechanism for supporting time in no-std and no-os #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. (slab-alloc: Create mechanism for supporting time in no-std and no-os #3) - Support custom allocators for the pointer hashmap (
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. (slab-alloc: Make ptr_map support no-std and no-os #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. (slab-alloc: Make ptr_map support no-std and no-os #6)