9 releases
0.1.8 | Jul 21, 2024 |
---|---|
0.1.7 | Jul 19, 2024 |
#65 in Memory management
33,777 downloads per month
Used in 175 crates
(7 directly)
47KB
1K
SLoC
Allocator for swc.
Features
scoped
: Enablescoped
mode.
Modes
Default mode
In default mode, crate::boxed::Box and crate::vec::Vec are identical to the original types in [std].
Scoped mode
- You need to enable
scoped
feature to use this mode.
In scoped
mode you can use [FastAlloc] to make crate::boxed::Box and
crate::vec::Vec very fast.
In this mode, you need to be careful while using crate::boxed::Box and crate::vec::Vec. You should ensure that [Allocator] outlives all crate::boxed::Box and crate::vec::Vec created in the scope.
Recommened way to use this mode is to wrap the whole operations in a call to Allocator::scope.
Dependencies
~4MB
~73K SLoC