View source code
Display the source code in std/experimental/allocator/building_blocks/free_list.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Function std.experimental.allocator.building_blocks.free_list.ContiguousFreeList.this

Constructors setting up the memory structured as a free list.

this (
  ubyte[] buffer
);

this (
  ParentAllocator parent,
  ubyte[] buffer
);

this (
  size_t bytes
);

this (
  ParentAllocator parent,
  size_t bytes
);

this (
  size_t bytes,
  size_t max
);

this (
  ParentAllocator parent,
  size_t bytes,
  size_t max
);

this (
  size_t bytes,
  size_t min,
  size_t max
);

this (
  ParentAllocator parent,
  size_t bytes,
  size_t min,
  size_t max
);

Parameters

NameDescription
buffer Buffer to structure as a free list. If ParentAllocator is not NullAllocator, the buffer is assumed to be allocated by parent and will be freed in the destructor.
parent Parent allocator. For construction from stateless allocators, use their instance static member.
bytes Bytes (not items) to be allocated for the free list. Memory will be allocated during construction and deallocated in the destructor.
max Maximum size eligible for freelisting. Construction with this parameter is defined only if maxSize == chooseAtRuntime or maxSize == unbounded.
min Minimum size eligible for freelisting. Construction with this parameter is defined only if minSize == chooseAtRuntime. If this condition is met and no min parameter is present, min is initialized with max.

Authors

License