12 releases (1 stable)

1.0.0 Oct 12, 2024
0.1.10 Oct 10, 2024
0.1.8 Jul 21, 2024

#93 in Programming languages

Download history 2581/week @ 2024-07-18 4957/week @ 2024-07-25 6645/week @ 2024-08-01 6355/week @ 2024-08-08 8775/week @ 2024-08-15 9562/week @ 2024-08-22 9892/week @ 2024-08-29 10643/week @ 2024-09-05 10195/week @ 2024-09-12 11672/week @ 2024-09-19 14195/week @ 2024-09-26 18776/week @ 2024-10-03 39142/week @ 2024-10-10 41096/week @ 2024-10-17 40097/week @ 2024-10-24 42318/week @ 2024-10-31

169,449 downloads per month
Used in 191 crates (7 directly)

Apache-2.0

47KB
1K SLoC

Allocator for swc.

Features

  • scoped: Enable scoped 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
~76K SLoC