Skip to main content

Module localalloc

Module localalloc 

Source
Expand description

Thread-local bump allocators.

Values allocated from Temp and Local Allocators must be freed by the same thread that allocated them, or the program will abort.

#Example

use pstd::localalloc::{TBox,tbox};
let b : TBox<u32> = tbox(99);
assert!( *b == 99 );

Structs§

Local
Local Allocator.
Temp
Temp Allocator.

Functions§

dbox
Allocate a std::boxed::Box or LBox depending on whether dynbox feature is selected.
lbox
Allocate a LBox.
lboxstr
Convert str to LBox<str>.
lbtreemap
Create a LBTreeMap.
lhashmap
Create a LHashMap.
lstring
Convert str to LString.
lvec
Create a LVec.
tbox
Allocate a TBox.
tvec
Create a TVec.

Type Aliases§

LBTreeMap
BTreeMap allocated from Local
LBox
Box allocated from Local
LHashMap
HashMap allocated from Local
LString
String allocated from Local
LVec
Vec allocated from Local
TBox
Box allocated from Temp
TVec
Vec allocated from Temp