#alloc #allocator #memory #global-alloc

bulk_allocator

Implementations for AllocRef. to pool allocated memory and to release them on the destruction.

3 releases (breaking)

0.3.0 Jan 29, 2021
0.2.0 Sep 4, 2020
0.1.0 Jul 24, 2020

#18 in #alloc

22 downloads per month

LGPL-3.0-or-later OR Apache-2.0

1MB
776 lines

Build Status

bulk_allocator

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

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

Method alloc pops and returns from the cache if not empty; otherwise, alloc allocates a bulk memory from the backend, splits into pieces to make cache at first.

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 is implementations for GlobalAlloc holding memory cache. The instance acquires bulk memories from the backend, and frees them on the drop at once for the performance.

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

Method alloc pops and returns from the cache if not empty; otherwise, alloc allocates a bulk memory from the backend, splits into pieces to make cache at first.

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

No runtime deps