Crate lol_alloc

source ·

Structs§

  • A non-thread safe allocator created by wrapping an allocator in a Sync implementation that assumes all use is from the same thread. Using this (and thus defeating Rust’s thread safety checking) is useful due to global allocators having to be stored in statics, which requires Sync even in single threaded applications.
  • Stateless heap grower. On wasm32, provides a default implementation of [MemoryGrower].
  • Allocator that fails all allocations.
  • A non-thread safe allocator that uses a free list. Allocations and frees have runtime O(length of free list).
  • A non-thread safe bump-pointer allocator. Does not free or reuse memory. Efficient for small allocations. Does tolerate concurrent callers of wasm::memory_grow, but not concurrent use of this allocator.
  • Allocator that allocates whole pages for each allocation. Very wasteful for small allocations. Does not free or reuse memory.
  • A thread safe allocator created by wrapping a (possible not thread-safe) allocator in a spin-lock.