You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 over Box<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 as flush and persist, or even log.
pubstructPBox<T>{
type PAlloc = PersistentAllocatorbox_:Box<T,PAlloc>}impl<T>PBox<T>{pubfnpersist(&self){};pubfnflush(&self){};}
Even better with GAT #3 feature, transaction can be generics as well.
Only one global_allocator in the whole crate graph
All memory must go through the persistent memory.
🤙 Wrap over a chunk
This is currently what the TBox did. it gets a pointer from the persistent memory allocator, and copys the data to the pointer.
Potential Drawbacks:
This doesn't work with more complicated data structures that have pointer indirection, like hashmap because it does not allocate memory as chunk, but is a container over a 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...)
Uh oh!
There was an error while loading. Please reload this page.
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
The text was updated successfully, but these errors were encountered: