Skip to content

Mimalloc Port (Free List Allocator and Mark Sweep Space) #348

Closed
@paigereeves

Description

@paigereeves

The goal is to have an implementation of malloc/free based on mimalloc.

Free List Allocator

  • Thread-local lists of owned 64kB blocks. Separated (possibly implicitly) into available, exhausted, and unswept blocks.
  • Segregated size classes.
  • Eager or lazy sweeping.
  • A method to sweep a marked block by constructing a free list.
  • (Lazy) allocate to unswept blocks by constructing free lists as required and moving swept blocks to the available list.
  • (Lazy) allocation is attempted first from a thread's available list, then its unswept list, then other threads' unswept lists, then fresh memory from the associated space.
  • Reconstruct thread-local block lists after marking.
  • A global list of all active 64kB blocks in that space, used for stealing unswept blocks from other threads.

Mark Sweep Space

  • Referencing the old MMTk's MarkSweepSpace policy, but excluding any functionality including free lists and size classes, for example, which are considered utility and exist within the allocator.
  • Send a signal to allocator threads when marking is completed.
  • Should be able to replace this with a (yet unimplemented) reference counting policy without any changes from the allocator's side.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-allocatorArea: AllocatorA-spaceArea: Space/PageResourceC-featureCategory: Feature

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions