12 releases (1 stable)

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

#91 in Programming languages

Download history 2425/week @ 2024-07-20 6280/week @ 2024-07-27 6254/week @ 2024-08-03 7221/week @ 2024-08-10 9191/week @ 2024-08-17 9574/week @ 2024-08-24 10489/week @ 2024-08-31 10315/week @ 2024-09-07 10429/week @ 2024-09-14 12898/week @ 2024-09-21 14021/week @ 2024-09-28 27013/week @ 2024-10-05 40202/week @ 2024-10-12 40696/week @ 2024-10-19 39666/week @ 2024-10-26 37160/week @ 2024-11-02

163,598 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