#alloc #allocator #memory #global-alloc

bulk_allocator

Implementations of GlobalAlloc holding memory cache

5 releases (3 breaking)

0.4.1 Feb 25, 2023
0.4.0 Feb 24, 2023
0.3.0 Jan 29, 2021
0.2.0 Sep 4, 2020
0.1.0 Jul 24, 2020

#115 in Memory management

Download history 2/week @ 2022-12-05 1/week @ 2022-12-19 1/week @ 2023-01-02 1/week @ 2023-01-09 1/week @ 2023-01-16 4/week @ 2023-01-23 5/week @ 2023-01-30 6/week @ 2023-02-06 9/week @ 2023-02-13 36/week @ 2023-02-20 13/week @ 2023-02-27 1/week @ 2023-03-06

59 downloads per month

LGPL-3.0-or-later OR Apache-2.0

1MB
2K SLoC

bulk_allocator

bulk-allocator provides implementations of GlobalAlloc holding memory cache. The instance acquires memory chunks from the backend and frees them on the drop at once for the performance.

Method dealloc does not free the specified pointer immediately, but pools in the cache.

Method alloc acquires a memory chunk from the backend and stores into the cache if the cache is empty, and then pops and returns a pointer from the cache.

It is when the instance is dropped that the memory chunks are deallocated.

License: LGPL-3.0-or-later OR Apache-2.0


lib.rs:

bulk-allocator provides implementations of GlobalAlloc holding memory cache. The instance acquires memory chunks from the backend and frees them on the drop at once for the performance.

Method dealloc does not free the specified pointer immediately, but pools in the cache.

Method alloc acquires a memory chunk from the backend and stores into the cache if the cache is empty, and then pops and returns a pointer from the cache.

It is when the instance is dropped that the memory chunks are deallocated.

No runtime deps