Open rickyyx opened 6 years ago
[global_allocator]
attributeAnother possible option which is to the `global_allocator' to have a persistent memory allocator altogether: https://doc.rust-lang.org/1.23.0/unstable-book/language-features/global-allocator.html
global_allocator
in the whole crate graph This is currently what the TBox
did. it gets a pointer from the persistent memory allocator, and copys the data to the pointer.
RawTable
in rust. In order to make the keys and values of the map persistent, need to be able to control the memory allocation of RawTable
. (Which is not exposed by Rust...)
Customized allocator for standard collections This will be a rather exciting feature for us if it can land.
Use case
A std lib's data structure can then obtain a memory pointer from the persistent memory allocator directly, For example, a Persistent Box
PBox
can be a wrapper overBox<T, A=PersistentAlloc>
This will make the library much more coherent with the standard library. In addition,PBox
will have interface that allows controlled persistence methods: such asflush
andpersist
, or evenlog
.Even better with GAT #3 feature, transaction can be generics as well.
Tracking issue