Expand description

A slab allocator implementation for objects less than 8KiB. This allocator does not use any of Theseus’s memory management abstractions, and works with pointers to the start of allocable pages.

Overview

The organization is as follows:

  • A ZoneAllocator manages many SCAllocator and can satisfy requests for different allocation sizes.
  • A SCAllocator allocates objects of exactly one size. It stores the objects and meta-data in one or multiple AllocablePage objects.
  • A trait AllocablePage that defines the page-type from which we allocate objects.

Lastly, it provides a default AllocablePage implementations ObjectPage8k that is 8 KiB in size and contains allocated objects and associated meta-data

Structs

  • Holds allocated data within 2 4-KiB pages.
  • Rawlink is a type like Option<T> but for holding a raw pointer.
  • A zone allocator for arbitrary sized allocations.

Traits

  • This trait is used to define a page from which objects are allocated in an SCAllocator.